100+ Spring Core, Spring Boot, Spring REST, Spring Security, Spring Cloud, and Spring Testing Annotations in a single post.
#share #follow #like #springframework #springmvc #springcloud #springboot #springdata
- @Autowired
- @Qualifier
- @Configuration
- @ComponentScan
- @Bean
- @Lazy
- @Value
- @Controller
- @Service
- @Repository
- @SpringBootApplication
- @ConditionalOnMissingClass
- @ConditionalOnBean
- @ConditionalOnMissingBean
- @ConditionalOnResource
- @ConditionalOnProperty
- @ConditionalOnWebApplication
- @ConditionalOnNotWebApplication
- @ConditionalExpression
- @Conditional
- @RequestMapping
- @CookieValue
- @CrossOrigin
- @GetMapping
- @PostMapping
- @PutMapping
- @PatchMapping
- @DeleteMapping
- @ExceptionHandler
- @InitBinder
- @Mappings and @Mapping
- @MatrixVariable
- @PathVariable
- @RequestAttribute
- @RequestBody
- @RequestHeader
- @RequestParam
- @RequestPart
- @ResponseBody
- @ResponseStatus
- @ControllerAdvice
- @RestController
- @RestControllerAdvice
- @SessionAttribute
- @SessionAttributes
- @EnableEurekaServer
- @EnableDiscoveryClient
- @EnableCircuitBreaker
- @HystrixCommand
- @CachePut
- @CacheEvict
- @CacheConfig
- @Async
- @ContextConfiguration
- @WebAppConfiguration
- @Timed
- @Repeat
- @Commit
- @RollBack
- @DirtiesContext
- @BeforeTransaction
- @AfterTransaction
- @Sql
- @SqlConfig
- @SqlGroup
- @SpringBootTest
- @DataJpaTest
- @DataMongoTest
- @WebMVCTest
- @AutoConfigureMockMVC
- @MockBean
- @JsonTest
- @TestPropertySource
Core Spring Framework Annotations:
- @Required- @Autowired
- @Qualifier
- @Configuration
- @ComponentScan
- @Bean
- @Lazy
- @Value
Spring Framework Stereotype Annotations:
- @Component- @Controller
- @Service
- @Repository
Spring Boot Annotations:
- @EnableAutoConfiguration- @SpringBootApplication
Spring Boot Auto-Configuration Conditions
- @ConditionalOnClass- @ConditionalOnMissingClass
- @ConditionalOnBean
- @ConditionalOnMissingBean
- @ConditionalOnResource
- @ConditionalOnProperty
- @ConditionalOnWebApplication
- @ConditionalOnNotWebApplication
- @ConditionalExpression
- @Conditional
Spring MVC and REST Annotations:
- @Controller- @RequestMapping
- @CookieValue
- @CrossOrigin
- @GetMapping
- @PostMapping
- @PutMapping
- @PatchMapping
- @DeleteMapping
- @ExceptionHandler
- @InitBinder
- @Mappings and @Mapping
- @MatrixVariable
- @PathVariable
- @RequestAttribute
- @RequestBody
- @RequestHeader
- @RequestParam
- @RequestPart
- @ResponseBody
- @ResponseStatus
- @ControllerAdvice
- @RestController
- @RestControllerAdvice
- @SessionAttribute
- @SessionAttributes
Spring Cloud Annotations:
- @EnableConfigServer- @EnableEurekaServer
- @EnableDiscoveryClient
- @EnableCircuitBreaker
- @HystrixCommand
Cache-Based Annotations:
- @Cacheable- @CachePut
- @CacheEvict
- @CacheConfig
Task Execution and Scheduling Annotations:
- @Scheduled- @Async
Spring Framework Testing Annotations:
- @BootstrapWith- @ContextConfiguration
- @WebAppConfiguration
- @Timed
- @Repeat
- @Commit
- @RollBack
- @DirtiesContext
- @BeforeTransaction
- @AfterTransaction
- @Sql
- @SqlConfig
- @SqlGroup
- @SpringBootTest
- @DataJpaTest
- @DataMongoTest
- @WebMVCTest
- @AutoConfigureMockMVC
- @MockBean
- @JsonTest
- @TestPropertySource
References:
- Spring official documentation
- https://www.javaguides.net/
Annotations
Java
Spring Framework
Comments
Post a Comment