- Content negotiation
- Transactional
- Scheduler (CRON JOB)
- Async
- Cacheable
- Controller vs RestController
- Qualifier and Primary
- Locks, Synchronised and ReentrantLock
- Spring AOP and Custom Annotations - Use @Before when you need to do something before a method executes (e.g., logging, security checks). Use @AfterReturning to work with the result of a method. Use @AfterThrowing to handle exceptions specifically. Use @After for cleanup activities that should run regardless of method success or failure. Use @Around for full control over method execution, to modify arguments or return values, or to implement complex conditional behavior around the method call.
- Testing - Repository Integration Testing - Use @DataJpaTest instead of @SpringBootTest and Autowired repository and TestEntityManager for persisting data. Controller Integration Testing (@SpringBootTest and @AutoConfigureMockMvc) - Use @SpringBootTest and @AutoConfigureMockMvc , specify port and then use restTemplate or mockMvc to test. Controller Unit Testing (@WebMvcTest(OrderFulfillmentController.class))- Use @WebMvcTest(Controller.class),( without ExtendsWith ) and mockMvc to test without specifying ports and all and use @MockBean only and mockMvc to call controller api. Service Unit Testing - Use @Mock and @InjectMocks for unit testing. Service Integration Testing - Use @Autowired and TestEntityManager for integration testing.
- Flyway Migration
- Profile annotation for switching between dev and prod profiles.
- Usage of OneToMany annotation.
-
Notifications
You must be signed in to change notification settings - Fork 0
navjotNSK/Concurrency
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Concepts of Async methods and Scheduler with Spring Boot CRUD Application
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published