This tutorial is the fifth in a series on Reactive Programming in Java and Spring Framework. In this tutorial, we will develop a simple REST API using Spring Web flux. To completely understand this tutorial, you must have followed the previous one and must have knowledge on how to develop a REST Controller in a…Read More Developing a REST API using Spring WebFlux.
Multiple data source implementations are very crucial in instances where we want to secure the application from vulnerabilities such as a database failure. This will ensure that the application can still function even if part of the database went down. This tutorial will use student and course entities to demonstrate how multiple data sources can…Read More Multiple Datasources in Spring Application
It will be very difficult for anyone to work with the reactive streams if they neither know how to create nor transform them. It will be clearly impossible to produce any useful program. As you may have guessed, in this tutorial, we will focus on the most common methods provided by Project Reactor to create,…Read More Important Spring Webflux Methods
This article is the third of a series on Reactive Programming. If you have not read the previous article, I would strongly advise you to do so. In this article, we will discuss how Reactive Programming is made possible in Spring. Spring WebFlux Spring WebFlux is the Spring project that makes Reactive Programming possible in…Read More Reactive Programming In Spring Framework
In this tutorial, you will learn how to use specification and predicate in Spring Data JPA using the Spring Boot RESTful API project. Spring Data JPA Specifications allow us to create dynamic database queries by using the JPA Criteria API. It defines a specification as a predicate over an entity. Spring has a wrapper around…Read More Specification & Predicate: Advance Search and Filtering in JPA
This tutorial will be part of our Series on Reactive Programming in Java and Spring Framework. If you have not read the previous article, I would strongly advise you to do so. This will help you to understand better as we go further. In the previous blog post, we discussed publishers and subscribers in Java.…Read More Reactive Programming: Creating Publishers and Subscribers in Java.
In this short article, we will discuss reactive streams in Java. This tutorial is the first of a series on reactive programming in Java and Spring Framework. It will lay down the basis that is required for the next tutorials. I am a big advocate of reactive streams and I find them very fun to…Read More Reactive Streams in Java
In this tutorial on Spring Cloud you will learn how to create your own Spring Cloud Config Server and also, how to configure a Spring Boot Application to be a Spring Cloud Config Client. Spring Cloud Config Server Spring Cloud Config Server is a Spring Boot application. So to create our own Spring Cloud Config…Read More Spring Cloud Config Server and Config Client
In this short tutorial, I am going to share with you how to switch your Spring Boot app, at runtime, to use a different logging level. Set Logging Level for a Package in Your App Let’s assume we have a Spring Boot Web Application with the following method in a Rest Controller class. @RestController @RequestMapping(“/users”)…Read More Switch Logging Level in Spring Boot at Runtime
In this tutorial, you will learn how to add a Social Login(OAuth 2) feature into your Spring MVC Web application. This will allow users to login to your application with their social network accounts like Facebook, Google, or other large services that support OAuth 2 like for example GitHub. Spring Security 5 offers very good…Read More Spring Security OAuth 2 Social Login
In this short tutorial, you will learn how to read an ID Token in your Spring Boot Web Application @Controller class. The ID Token is a security token that is issued by the Identity Provider Server and it contains information about the currently authenticated user. For example, from the ID token, you can get the…Read More Reading OAuth2 ID Token in Spring MVC
In this tutorial, you will learn how to use @AuthenticationPrincipal annotation to get the Jwt object containing the details of a provided in HTTP Request access token. When we send a request containing an access token in the Authorization header, behind the scenes, Spring Framework will do a lot of work and if all is good,…Read More @AuthenticationPrincipal – Getting the Jwt Claims
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 tutorial, you will learn how to use the @PostAuthorize annotation to secure the return of the method’s return value in your Spring Boot Application. The @PostAuthorize annotation is evaluated after the business logic in a method is executed and if needed will prevent the method from returning a return value. There are other…Read More @PostAuthorize Security Annotation Example