Application Structure & Service Layer
Clarification
At a certain point in the video it is mentioned that the @Service
annotation is optional but recommended for documentation purposes. However, it does actually make a difference when you are using the @Autowire
. Spring might not be able to automatically find and inject the Service
class if the @Service
annotation is missing. So in short: you should use it!
Links
Sagan: the spring.io site and reference application
RealWorld Example Apps
Top comments (0)