Spring autowire dependency defined in an abstract class

后端 未结 2 1456
滥情空心
滥情空心 2020-12-21 17:27

I have an abstract class \"Command\" with an @Autowired dependency and classes extending the abstract class. The dependency is not being injected. The abstract and concret

2条回答
  •  自闭症患者
    2020-12-21 17:51

    This can be achieved with XML configuration(not sure about annotations). Read this http://docs.spring.io/spring-framework/docs/3.0.0.RC3/reference/html/ch03s07.html

    Try this(add other config to child bean?)

    
      
    
    
    
    
    
    

    cheers!

提交回复
热议问题