jeudi 10 janvier 2019

In spring Container How @Autowire can track which dependancy to inject in setter Method

I can understand how @Autowired can track the the dependency of the value.How they identify which setter method to invoked in run-time using reflection. And set the value in appropriate method.

I want to understand internal code implementation of @Autowired. How they can work internally. I can also read this raw code BeanWapper & AbstractAutowireCapableBeanFactory but I do not understand the actual implementation of @Autowired.

I can Refer these :-

https://github.com/spring-projects/spring-framework/blob/master/spring-core/src/main/java/org/springframework/util/ReflectionUtils.java#L202

https://github.com/spring-projects/spring-framework/blame/master/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java

https://github.com/spring-projects/spring-framework/commit/a95843a0684585e09dcb63c7ce06a04c7f16d72a





Aucun commentaire:

Enregistrer un commentaire