Spring MVC

This tutorial will teach you how to use the @Query annotation to run custom SQL queries. Spring Data JPA provides us with many ready-to-use query methods which allow us to perform basic CRUD(Create, Read, Update and Delete) operations. However, sometimes, even though we have this ready-to-use Query method, we still need to run a custom…

Read More Spring Data JPA Native SQL Query

In this tutorial, we will create a Spring Boot application which demonstrates how we can add and use the H2 in-memory database in our application. You will learn how an in-memory database like H2 can be used to develop a Spring boot application without the overhead of doing DB configuration on your machine and without…

Read More Using H2 In-memory Database in Spring Boot

In this blog post, you will learn about three different ways to read application properties in the Spring Boot application. Read application.properties using Environment object,  Read a property from application.properties file using @ConfigurationProperties and reading a property using the @Value annotation. To demonstrate how to read application properties in the Spring Boot application, I have created a very…

Read More Reading application.properties in Spring Boot

Adding logging support to your RESTful Web Service application with Spring Boot is extremely simple. To use Spring Boot logging, you do not need to add any additional dependencies or libraries to your web app project other than the spring-boot-starter-web dependency. If you are working on a Spring Boot Web or a Web Services project, you…

Read More Spring Boot Logging with LoggerFactory