This post shows how to truncate a table in MySQL before DbUnit loads data via @DatabaseSetup. Truncating the tables in the @Before method does not
Using @Conditional with @Configuration in Spring
Using @Conditional with @Configuration in Spring allows us to group @Bean objects loaded on a specific condition without resorting to using @Profile and too many
Spring Boot – Publish and Consume Custom Application Events
This post shows how to implement the Observer Design Pattern using the facilities available from Spring Application Events. More importantly, it shows how to publish
Spring Boot Security Tests With PreAuth And WithMockUser
When we implement authorization in Spring Boot with Spring Security, for instance, using the PreAuth annotation, we should never skip automated tests for it. We
Retry Operation at specific Exception using Spring Retry
Spring-Retry allows us to retry operations when the codes encounter exceptions. How do we limit the retries to specific exceptions only? For instance, we wouldn’t
Spring Boot Call Stored Procedure With Spring Data @Procedure
Although most applications use SQL statements, we may need to call stored procedures instead. For instance, we could reuse existing stored procedures instead of crafting
Spring – Multiple Names Or Aliases For A Bean
Sometimes we have use cases that require different codes to reference the same bean using other names or aliases. Fortunately, we can have one bean
Spring Boot Asynchronous Controller Without External Queues
This post shows how to create an asynchronous web controller or endpoint in Spring Boot (or Spring in general). The codes won’t use external queues
Spring MVC – How To Test For View Name
This post briefly demonstrates how to test for a view name in Spring MVC.
Read From Multiple Properties Files In Spring Boot
This post demonstrates how to read properties from multiple .properties files in Spring Boot.