The issue of spring dependency injection

We often use @Value @Autowired implanting

Provided that you use these classes must be annotated to spring management, otherwise it can not be injected

If you manage to spring, then obtain new instances of the class can not use the (new after class inside the injection property does not have value)

 

 
Published 168 original articles · won praise 16 · views 90000 +

Guess you like

Origin blog.csdn.net/ajax_yan/article/details/105092305
Recommended