Spring Boot

With this Spring Boot tutorial, I will share how to handle exceptions in your RESTful Web Service application build with Spring Boot. Read the “Handling Exceptions in Project Reactor” tutorial if you use a project reactor. And to learn how to test your code for Exceptions, read the “Test for Exceptions with the JUnit” tutorial. What…

Read More Handle Exceptions in Spring Boot RESTful Service

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

In this blog post, I will share how to create a very simple RESTful Spring Boot Web Service that uses Spring Data JPA to save information to a database. Our Web Service will accept HTTP Post requests with user details and then save these user details into MySQL Database using Spring Data JPA CrudRepository. For code…

Read More Spring Boot REST and JPA – Save to a Database

With this blog post, I will share Spring annotations for mapping HTTP requests into specific handler methods. These are @PostMapping, @GetMapping, @PutMapping and the @DeleteMapping. In most Spring Boot applications, you will see the use of @RequestMapping annotation, which I will also include in this blog post. But I will start with the new ones, which are more…

Read More Spring Boot – @PostMapping, @GetMapping, @PutMapping, @DeleteMapping