spring中autowired注解



当执行这个action的时候,这个Test3怎么也注入不进来,这个Test3在spring容器初始化的时候已经初始化了
------解决方案--------------------Test3 应该使用注解@Component
------解决方案--------------------按理说没问题阿.....你的action是怎么生成的?也是Spring托管的么?
------解决方案--------------------@Service("test3")
------解决方案--------------------你试试手动写个<bean> 这个肯定可以的
然后你看看你注入的bean在不在你列出的扫描包内。
3楼的也试试,把Autowired 换成 Resource 试试。