Home > Mobile >  Accessing source code for Spring Annotations
Accessing source code for Spring Annotations

Time:05-18

Where can I see the source code behind the @Service or org.springframework.stereotype.Service in the Spring framework?

CodePudding user response:

Annotations themselves do not carry implementation logic, just some simple attributes. The framework (Spring in our case) just checks for the existence of annotations (i.e instances of an annotation class like Service) on our classes and then acts accordingly. For example, if it sees a Service present, it will instantiate our class as a bean and manage that bean.

CodePudding user response:

If you are using IDE, to check @Service implementation you can press Ctrl and click on this annotation. org.springframework.stereotype.Service interface will be opened in this case.

  • Related