Java普通类 访问 spring mvc的接口实现类

<div class="iteye-blog-content-contain" style="font-size: 14px">

ApplicationContext applicationContext = SpringContextUtil.getApplicationContext()
Object jt = applicationContext.getBean("别名");
Object jt = applicationContext.getBean(Object.getClass);
这两种都能用

</div>

猜你喜欢

转载自yw-believe.iteye.com/blog/2341821