Configure Spring Boot to use Jetty Server

By default, Spring boot uses Tomcat as embedded Web server. There are, however, other available Web servers in case you need some specific features. In this tutorial we will learn how to use Jetty as Web Server. Add spring-boot-starter-jetty dependency You will need to update pom.xml and add dependency for spring-boot-starter-jetty. Also, you will need … Read more

How to change Context path in a Spring Boot application

Out of the box, Spring boot applications are accessed through the default context path “/” i.e. you can access the application directly at http://localhost:PORT/. In this tutorial we will learn how to change the default root Web context of a Spring Boot application. As you will see, Spring boot is quite flexible and provide you multiple options to configure applications context root path.

Read more

Configuring SpringBoot starter parent dependency

If you open a Spring Boot project, you will see that at the top they all use a spring-boot-starter-parent as the parent in pom.xml. <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.1.0.RELEASE</version> <relativePath/> </parent> Parent Poms allow you to manage several aspects for the child projects such as: Dependency Management – Version of dependencies Configuration – Java Version and … Read more

SpringBoot starter templates

Spring Boot starter dependencies are a great way to simplify the dependencies section of your project’s build specification by aggregating commonly used dependencies under more coarse-grained dependencies. The first benefit of Spring Boot starter dependencies it that your build will transitively resolve the dependencies that are declared in the starter dependency. This way your dependency list will be smaller.
The other benefit is that they are typically organized by the type of functionality they bring to an application. For example, rather than specify specific libraries required for jpa (such as spring-orm, hibernate and spring data jpa) you can simply add the spring-boot-starter-data-jpa starter as a dependency.

Read more

Configuring SpringBoot to use MySQL

In this tutorial we will learn how to create a basic application using Spring Boot CLI and MySQL as database. We will then import the application into an IDE to create a sample application which stores some data which is later retrieved by the SpringApplication class.

Read more

Using SpringBoot with JPA tutorial

In this tutorial we will learn how to create a basic application using Spring Boot CLI. We will then import the application into an IDE to create a sample application which stores some data which is later retrieved by the SpringApplication class.

Read more