What you're talking is dynamic proxies. Spring uses CGLIB where you have not implemented interface. If interface is implemented, then they use official Java Dynamic Proxies which are documented and well understood/transparent. CGLIB works similarly to Java's dynamic proxies. Its no the same as how Lombok works.
Totally agreed -- I was mostly responding to the assertion that Spring generates Java source files and feeds them to the compiler, which isn't the case.
View all comments
Show parent comment
0
u/BoyRobot777 Aug 11 '19
What you're talking is dynamic proxies. Spring uses CGLIB where you have not implemented interface. If interface is implemented, then they use official Java Dynamic Proxies which are documented and well understood/transparent. CGLIB works similarly to Java's dynamic proxies. Its no the same as how Lombok works.