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 could use the @PreAuth, among other annotations, to control authenticated users’ access to some methods
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 want to retry SOAP Web Service operations. The operations may throw exceptions due to invalid
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 new codes. As a result, we do not need to create new test cases, and
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 and give them multiple aliases in Spring. This post shows how to assign multiple names
Spring MVC – How To Test For View Name
This post briefly demonstrates how to test for a view name in Spring MVC.
Spring Dependency Injection Examples Without Spring Boot
The Spring Framework has come a long way. Nowadays, it is way easier to start a Java project with the Spring Framework using Spring Boot. In the past, we used to download Spring individual jar files and configure the dependencies
Render XML using Thymeleaf
This post demonstrates how to render an XML to a file from a given XML template using Spring Boot and Thymeleaf.
Spring Boot + Spring Security with Multiple Login Forms and User Types
I’m working on some personal project that handles 4 different user types (e.g., students, instructors, registrar employees, security personnel). Each user type are stored in a separate user table. With this, I require four (4) login forms.
Spring – Configurable Default Value for @Value
This post demonstrates how to use @Value that has both a configurable default value and a hard-coded final fallback value.