玩!框架-Spring.getBeanOfType起作用,但@Autowired失败
||
我正在使用
play spring-1.0.1
模块,并根据文档:
To enable component scanning, add this line to the
/conf/application.conf文件:
play.spring.component-scan=true
Note that enabling this scans for @org.springframework.stereotype.Component,
@ org.springframework.stereotype.Repository,
@ org.springframework.stereotype.Service
识别春豆。
此外,运行组件
扫描启用对注释的支持
基于配置(即,
@ org.springframework.beans.factory.annotation.Autowired,
等等)。
当我尝试相同的操作时,它无法说出wire3ѭ,因为它无法将Bean连接到相应的类。
虽然
play.modules.spring.Spring.getBeanOfType(UserManager.class);
在我的模型上工作正常。
这是已知问题还是我做错了
谢谢
没有找到相关结果
已邀请:
0 个回复