spring-bootSpring boot + Spring Data JPA


Spring Boot makes it easy to create Spring-powered, production-grade applications and services with absolute minimum fuss. It favors convention over configuration.

Spring Data JPA, part of the larger Spring Data family, makes it easy to implement JPA based repositories. It makes it easier to build apps that use data access technologies.



@Repository: Indicates that an annotated class is a "Repository", a mechanism for encapsulating storage, retrieval, and search behavior which emulates a collection of objects. Teams implementing traditional J2EE patterns such as "Data Access Object" may also apply this stereotype to DAO classes, though care should be taken to understand the distinction between Data Access Object and DDD-style repositories before doing so. This annotation is a general-purpose stereotype and individual teams may narrow their semantics and use as appropriate.

@RestController: A convenience annotation that is itself annotated with @Controller and @ResponseBody.Types that carry this annotation are treated as controllers where @RequestMapping methods assume @ResponseBody semantics by default.

@Service: Indicates that an annotated class is a "Service" (e.g. a business service facade). This annotation serves as a specialization of @Component, allowing for implementation classes to be autodetected through classpath scanning.

@SpringBootApplication: Many Spring Boot developers always have their main class annotated with @Configuration, @EnableAutoConfiguration and @ComponentScan. Since these annotations are so frequently used together (especially if you follow the best practices above), Spring Boot provides a convenient @SpringBootApplication alternative.

@Entity: Specifies that the class is an entity. This annotation is applied to the entity class.

Official Documentation

Pivotal Software has provided a pretty extensive documentation on Spring Framework, and it can be found at