Category: Spring Framework
Spring Boot – Random Configuration Property Values
In this tutorial we demonstrate how to generate random property values for configuration properties using Spring Boot. The RandomValuePropertySource class is added – by spring boot – to the classpath. We can use it...
Spring Boot – Create Executable using Maven without Parent Pom
Not everyone likes inheriting from the spring-boot-starter-parent POM to create an executable jar/war. You may have your own corporate standard parent that you need to use, or you may just prefer to explicitly declare...
Spring Boot – Create Executable using Maven with Parent Pom
Maven users can inherit from the spring-boot-starter-parent project to obtain sensible defaults. You should only need to specify the Spring Boot version number on this dependency. If you import additional starters, you can safely...
Spring boot – Create a Custom Banner Example
You can change the mission critical banner that is printed on start up with your own custom banner. You have the option to add your own custom banner.txt text file by setting the banner.location...
Unit Test Spring MVC Rest Service: MockMVC, JUnit, Mockito
Previously we saw how to create a spring mvc restful web service. In this tutorial we continue by showing how to unit test this spring mvc rest service using JUnit, Mockito and Spring Test...
Spring MVC RESTFul Web Service CRUD Example
In this tutorial we show you how to build a RESTFul Web Service using Spring MVC 4. We create a controller that’ll manage CRUD operations like Create, Read, Update and Delete using the correct...
Spring MVC PDF View Example
This tutorial demonstrates how to create a PDF view using Spring MVC and itext. Out of the box spring only supports the older com.lowagie:itext library. The newest com.itextpdf:itext library is not supported by default....
Spring MVC Excel View Example
In this tutorial we demonstrate how to create an Excel view using Spring MVC. By utilizing Spring MVC Content negotiation we can have multiple views of the same resource. This example shows how to...
Spring MVC RSS ATOM Content Negotiation Example
In this tutorial we show a Spring MVC RSS ATOM Content Negotiation example. Using Content Negotiation we can serve different versions of a document (or resource) at the same URI. Depending on the HTTP...