How to Create Annotation based Spring Application

Introduction We will see how to create annotation based Spring application or annotation based configuration in Spring application. We will use here H2 database to perform database activities using Spring JDBC Template. We will not use any XML configuration here or zero XML configuration. We will also see how to run this stand-alone Spring application using main method. This application…

Integrate H2 In-memory Database with Spring

Introduction This tutorial will show you how to integrate in-memory H2 database with Spring. We will see here simple example to understand how it works. Here we will use Spring JDBC API to perform database activities. You can use this example with Spring based applications, such as, Spring Core, Spring MVC etc. You may also like to read Integrate H2…

Spring Boot Actuator – Creating Custom Endpoints

Spring Actuator Here you will see example on creating custom endpoints in Spring Boot Actuator. There are a number of endpoints provided by Spring Boot however you may want to create a custom endpoint using Spring Boot Actuator. You have seen few examples on Spring Boot actuators:

Spring Boot Actuator – Securing HTTP Endpoints

Secure Actuator HTTP Endpoints Here you will see example on securing HTTP endpoints in Spring Boot application. Like other sensitive URLs, you should take care to secure HTTP endpoints. If Spring Security is present, endpoints are secured by default using Spring Security’s content-negotiation strategy. If you wish to configure custom security for HTTP endpoints, for example, only allow users with…

Spring Boot Actuator – Accessing Endpoints via JMX

Access Endpoints via JMX This tutorial will show you how to access Endpoints via JMX in Spring Boot Actuator. As you may know only /actuator/health and /actuator/info are accessible over HTTP protocol for security reasons. Therefore if you want to access other end points you have to access over JMX. JMX console comes with the JDK installation, so you don’t…

Spring Boot Actuator – Production Ready Features

Actuator Spring Boot Actuator that includes additional features to help you monitor and manage your application in production. You can monitor your application’s auditing, health, and metrics by using HTTP endpoints or with JMX. Spring Boot Actuator includes a number of built-in endpoints and lets you add your own. For example, the health endpoint provides basic application health information.

Create Microservices using Spring Boot and build using Gradle

Introduction Here we will see how to create Microservices using Spring Boot and Spring Cloud and build using Gradle tool. What are Microservices? Before I tell you about the microservices, I would like to tell you about monolithic architectural style, which is built as a single, autonomous unit. So let’s say an web application with client-server model, where the server-side…

Integrate H2 In-memory Database with Spring Boot

Spring Boot and H2 Database This tutorial will show you how to integrate in-memory H2 database with Spring Boot and build using Gradle/Maven tools. You will see here simple Spring Boot Data JPA example with Spring REST API to understand how it works. H2 is in-memory database, so it does not have persistence capability once your Spring Boot application is…

Angular + Spring Boot file upload example

Introduction Here we will see how to upload file using Angular and Spring Boot application. The Angular + Spring Boot file upload example will use the Angular example from and we will see here how to write server side code for Spring Boot application. We will also exclude the default server Tomcat and include the Jetty server for our Spring…

Use Jetty instead of Tomcat in Spring Boot application

Spring Boot App Server Spring Boot web starter uses Tomcat as the default embedded servlet container or Tomcat is the default embedded server. So you don’t need to add any separate dependency for this Tomcat server. The Tomcat server is shipped with the spring boot starter web dependency. Now let’s say your requirement is to not use the default server…