Skip to content

Files

Latest commit

 

History

History

Part-3 Spring Boot Annotations

Spring Boot Projects - Full Stack

Total projects provide Source Codes/Guides/App, indeed down below represents. We take an opinionated view of the Spring platform and several-party libraries so you can get started with as Spring Boot.

Part-3: Spring Boot Annotations

  • (resource / code ) Practical Experience with Annotation

    • Spring Boot Annotations Definiation and Practics
    • Spring Boot @EnableAutoConfiguration Annotation with Example
    • Spring Boot @SpringBootApplication Annotation with Example
    • Spring Boot - Creating Asynchronous Methods using @Async Annotation

    Those annotation which we implemented in the projects.

         @Autowired
         @Qualifier("laptop") this may use component regarding laptop name... (ex>= Component("lap1")
    
         @autoconfiguration
         -------------------------
         @Bean
         -------------------------
         @Configuration
         @Control
         @Component
         @ComponentScan
         -------------------------
         @Data ---> at the class level is provided by Lombok and tells Lombok to generate all of those missing methods. 
         @DeleteMapping
         -------------------------
         @EnableAutoConfiguration
         @Entity
         @EnableWebSecurity
         ------------------------
         @ManyToMany (targetEntity=Ingredient.class_)
         @ManyToOne
         ------------------------
         @NotNull
         @NotBlank
         @NoArgsConstructor ( access=AccessLevel.PRIVATE, force=true)
         ------------------------
         @GetMapping
         -------------------------
         @Service
         @SpringBootApplication
         @SpringBootTest
         @Size
         @Slf4j - Simple Logging Facade for Java. Lombok's @Slf4j annotation to create a free SLF4J Logger object at runtime.
         @SessionAttributes
         @SuppressWarnings("")
    
         -------------------------
         @PostMapping
         @PutMapping
         @PatchMapping
         @PrePersist
         @Profile
         -------------------------
         @RunWith(SpringRunner.class)---> prividing a test runner that guides JUnit in running a test. Plugin to JUnit to provide custom.
         @Repository
         @RequestMapping
         @RequiredArgsConstructor
    
         ------------------------
         @Table
         ------------------------
         @Query("")
         ------------------------
         @Valid
         ------------------------
         @WebMvcTest  - set up Spring support for testing Spring MVC. Although it could be made to start a server, mocking the mechanics of Spring MVC.