Tomcat Invalid Character in Request

Oct 10, 2018

8.5 Tomcat throws an `IllegalArgumentException` when processing request URL that has non-encoded illegal special characters. This article shows two workarounds.... Read more

Spring Data Repository Query Precedence Tricks

Oct 10, 2018

Spring Data repository method is very handy but it also comes with its limitation, especially when composed with condition precedence. This article shows one way to work with it and its caveats.... Read more

Add Model Attributes to Layout Template

May 11, 2018

`@ControllerAdvice` is widely used to create exception handlers in a cross-cutting way when writing a Spring MVC or REST application. It could also be used to solve adding model attributes to any groups of controllers so that the model could be share... Read more

Spring Data Substitutes ObjectMapper

Apr 27, 2018

Most of the times when we need a DTO mapping from our persistent entity, we would think of using an ObjectMapper. However, with the help of the Spring Data, you might not need an ObjectMapper. This lesson presents a solution to use Spring Data to rep... Read more

Java Servlet CORS Filter with Preflight Options

Apr 26, 2018

A CORS filter determines what types of access control header will be set for the server response to the client's request. However, when the resource being accessed is behind a security layer, in order to send the payload to the security filters, an ... Read more