How to change Spring’s Boot startup ASCII message

How to change Spring’s Boot default startup ASCII message problem You wish to change the default banner – logo of Spring Boot. The default one at the time of writing this post looks like this: SOLUTION 1 – ASCII Create a text based banner (ASCII) and place it in the classpath with a file title: […]

How to change server’s port number in Spring Boot

How to change the server’s port number in spring boot problem You have a Java web application that uses Spring Boot and you wish to change the default port number (i.e. 8088) the web server is running on. SOLUTION 1 One solution is by specifying the preferred port number in the application.properties file as follows: […]

Send an email using Java and Spring boot and Gmail

Send an email using Java and Spring boot and gmail problem You wish to use email functionality in your web application that is built using the Spring framework. In this post we will see how to accomplish it using a Gmail account. Also, I will be using IntelliJ IDEA Ultimate edition (that supports Spring Framework) […]

Creating an Echo controller in Java with Spring boot

Creating an echo controller in Java with Spring boot problem You wish to create an endpoint in your web application that when it is hit, it echoes back the data you’re sending. A basic example would be to add a parameter message and then it prints it back. SOLUTION Let’s create a Spring Boot project. […]

Parsing polymorphic models in Spring boot

Parsing polymorphic models in Spring boot problem You wish to build a web application that will be accepting HTTP POST requests with JSON objects in their request body to be parsed into your Java models. On top of that, the models will be using enums and inheritance. SOLUTION Spring boot to the rescue. Using IntelliJ […]