-
Enterprise Java
CSRF protection in Spring MVC, Thymeleaf, Spring Security application
Cross-Site Request Forgery (CSRF) is an attack which forces an end user to execute unwanted actions on a web application…
Read More » -
Core Java
JUnit ExpectedException rule: beyond basics
There are different ways of handling exceptions in JUnit tests. As I wrote in one of my previous posts, my…
Read More » -
Enterprise Java
HOW-TO: Test dependencies in a Maven project (JUnit, Mockito, Hamcrest, AssertJ)
JUnit itself is not enough for most of today’s Java projects. You also need a mocking library, maybe something else.…
Read More » -
Enterprise Java
Configure favicon.ico in Spring MVC based application
Favicon is an icon (favicon.ico) associated with your website. Not every website is using favicon though. But most browsers do…
Read More » -
Core Java
Parameterized JUnit tests with JUnitParams
Parameterized unit tests are used to to test the same code under different conditions. Thanks to parameterized unit tests we…
Read More » -
Enterprise Java
HOW-TO: Get started quickly with Spring 4.0 to build a simple REST-Like API (walkthrough)
HOW-TO: Get started quickly with Spring 4.0 to build a simple REST-Like API (walkthrough) Yet another tutorial about creating Web…
Read More » -
Enterprise Java
HOW-TO: Custom error pages in Tomcat with Spring MVC
Default Tomcat error pages look scary. In addition, they may expose valuable information including server version and exception stack trace.…
Read More » -
Enterprise Java
Thymeleaf template layouts in Spring MVC application with no extensions
After some years with JSP/JSTL and Apache Tiles I started discovering Thymeleaf for my Spring MVC applications. Thymeleaf is a…
Read More » -
Core Java
3 ways of handling exceptions in JUnit. Which one to choose?
In JUnit there are 3 popular ways of handling exceptions in your test code: try-catch idiom With JUnit rule With…
Read More »