我必须在使用Scala时自动接线,就像这样
val appContext = new ClassPathXmlApplicationContext("applicationContext.xml")
val userStatusBiz = appContext.getBean("userStatusBiz").asInstanceOf[UserStatusBiz]
在UserStatusBiz(一个Java类)中,它会像这样自动连接一些DAO
@Autowired
private UserStatusDAO userStatusDAO;
在我的applicationContext中添加
<bean class="net.paoding.rose.jade.context.spring.JadeBeanFactoryPostProcessor"/>
最后得到了这个
Error creating bean with name 'userStatusBiz': Injection of autowired dependencies failed;
No qualifying bean of type [com.common.mysql.dao.UserStatusDAO] found for dependency
需要帮助,谢谢^ ^