Yes, the bottom layer is all implemented using reflection
Annotations used in the spring framework
@Bean, @Controller, @Sercice...... The
and so on are java reflection techniques, right?
0 Answer
Yes, use reflection to get comment information and then perform container initialization based on that information.
yes, < a > @ Bean, @ Controller, they are essentially org.springframework.stereotype.Com ponent, They all inherited org.springframework.stereotype.Com ponent, at the time of service launch, Scans increased org.springframework.stereotype.Com ponent annotations and inherited the org.springframework.stereotype.Com ponent annotation class, Finally, register these beans into the spring context
这家伙很懒,什么都没留下...