RESTful Web Services

By default, Spring Boot RESTful Web service endpoints consume and produce JSON representation. But we can easily make our RESTful Spring Boot Web service endpoints consume and produce an XML representation of a resource as well. Add XML Support to Spring Boot Project To make our Spring Boot project consume and produce an XML representation…

Read More Consuming XML in Spring Boot REST

HATEOAS is a way to make your RESTful Web Service endpoint, automatically include links to other Resources of your API, in the response that it sends back to a calling client application.  The client application that consumes your web service endpoint, can then use those links, to consume other RESTful Resources that your Web Service…

Read More Add HATEOAS to Spring Boot RESTful Web Service

In this Spring Security tutorial, you will learn how to use the @PreAuthorize annotation to secure method invocation. You can use the @PreAuthorize annotation to secure either method in a Controller class or a method in a service layer class. There are other useful method level security annotations like the ones below. It is useful…

Read More Spring Security @PreAuthorize Annotation Example

In this Spring Security tutorial, you will learn how to enable and use the Method Level Security with @Secured annotation. There are other useful method level security annotations like the ones below. It is useful to know how they work as well. @PostAuthorize Security Annotation Example, @PreAuthorize Security Annotation Example. If you are interested in video…

Read More Spring Security @Secured Annotation Example

In this tutorial, you will learn how to make Zuul API Gateway pass an Authorization header to a downstream Microservice. To learn how to make Spring Boot Microservice read HTTP Request headers, please read this tutorial: Read HTTP Request Header in Spring MVC. Configure Zuul API Gateway to Forward an Authorization Header By default, Zuul…

Read More Pass Authorization Header to Downstream Microservice

In this tutorial, I am going to share with you how to generate a self-signed certificate and enable HTTPs/SSL support in a Spring Boot application. You will also learn how to configure RestTemplate HTTP client to use the same self-signed certificate to communicate with your Web Service over HTTPs. Let’s start by generating a self-signed…

Read More Enable HTTPs/SSL in Spring Boot App

In this Spring Boot tutorial, you will learn how to get the details of the currently authenticated principal user. There is more than one way to get currently authenticated user details and in this blog post, I am going to share with you a few. Most likely you already have Spring Security configured for your…

Read More Spring Security. Get Authenticated Principal Details.

In this Spring Boot Security tutorial, you will learn how to enable Basic Authentication for your Spring Boot project and how to configure the default username, password and user role. You will also learn how to secure a web service request URL so that only authenticated user with a default username, password and role can access.…

Read More Spring Security Default Username, Password, Role

In this tutorial, you will learn how to add Spring Security to your project and how to enable in-memory basic authentication. You will learn how to configure two different users with different Roles and Privileges. Both users, their roles and privileges will be stored in the memory of your application. Create a New Spring Boot…

Read More Spring Security In-Memory Authentication

In this tutorial I am going to share with you how to use Feign Client to send HTTP Request to another Microservice. For a step by step series of video lessons, please check this page: Spring Boot Microservices and Spring Cloud. Adding Feign to Your Project To use Feign Client in your Spring Boot application,…

Read More Feign Client to Call Another Microservice

In this Spring Boot tutorial, you will learn how to implement User Authentication(User Login) functionality for your RESTful Web Service built with Spring Boot, Spring MVC, Spring Security using JWT. There is also a step-by-step video demonstration on how to do User Authentication available here. The user authentication functionality we are going to implement in…

Read More User Authentication – Spring Boot, Spring Security, JWT

In this tutorial you will learn how to bind nested properties from application.properties file to a Java class. Once you finish this tutorial you might also want to check: How to bind simple(not nested) properties to a Java class, and How to use @ConfigurationProperties with Spring Boot @Profile. Example of Nested Properties in a Properties File…

Read More Spring Boot Nested Properties with @ConfigurationProperties

In this tutorial you will learn how to use @ConfigurationProperties together with Spring Boot Profiles and @Profile annotation. This tutorial assumes you have a basic knowledge of how to use @ConfigurationProperties in your Spring Boot application. If you are very new to it, then please read this tutorial: Spring Boot @ConfigurationProperties Tutorial. You should also have…

Read More Using Spring Boot @ConfigurationProperties and @Profile

@ConfigurationProperties is used to bind all the properties in a properties file to a Java class annotated with @ConfigurationProperties. You can then use a Java object to access configuration properties defined in a properties file. Earlier I have shared with you a tutorial on how to read application properties in Spring Boot RESTful Web Service…

Read More Spring Boot @ConfigurationProperties Tutorial

Free Video Lessons

Enter your email and stay on top of things,

Subscribe!