Could the Autowiring using @Autowired spring annotation happen at class initialization, and not just before constructor call ? thanks for help
            Asked
            
        
        
            Active
            
        
            Viewed 1,480 times
        
    2 Answers
0
            
            
        Ass described here: https://blog.jdriven.com/2015/03/spicy-spring-different-ways-of-autowiring/:
Constructor Autowiring
Method Autowiring
with this ways of inject dependencies you have more control over the logic you want to apply during a bean initialization.
 
    
    
        rjsperes
        
- 65
- 1
- 8
0
            
            
        To elucidate on what rperes said, the InjectableBean is being injected at construction, but if you have not configured InjectableBean as a component to be injected, then you will have problems.
Check that your configuration for InjectableBean is correct. Have a look at Spring: Properly setup @ComponentScan
 
    
    
        Community
        
- 1
- 1
 
    
    
        Breandán Dalton
        
- 1,619
- 15
- 24
