Single sign-on in Spring Boot applications with Spring Security OAuth

This week I had to dig deeper into the world of Single sign-on. I learnt a lot of things about it from basic conceptual knowledge to how to setup your own Single sign-on server with Spring Boot. In this post, I will share my learnings with you. In case something is not clear please leave a comment and I will address it.

Continue reading “Single sign-on in Spring Boot applications with Spring Security OAuth”

Advertisements

A Minimalist Guide to Building Spring Boot Angular 5 Applications

Over the last year, I have worked with many teams using Spring Boot with Angular/React for developing Java web applications. I consider Spring Boot a pragmatic opinionated way to build Spring applications. Spring Boot makes it easy to build web applications in Java and provides a productive environment for development.
Continue reading “A Minimalist Guide to Building Spring Boot Angular 5 Applications”

Unit Testing File Upload REST API using Spring MVC MockMvc

Today a colleague asked me how he could unit test a Spring MVC REST resource. I am using Spring MVC test support for some time now so the obvious answer was to use MockMvc. In case you have not used MockMvc, it allows you to declaratively write tests for your Spring MVC controllers. Rather than calling controllers directly, you use the MockMvc fluent API to make a request to a URL and verify the response returned by the API. You can read Spring MVC documentation to learn about MockMvc in detail.

Continue reading “Unit Testing File Upload REST API using Spring MVC MockMvc”

Keeping Spring Boot Powered REST API Request and Response Objects Minimal

I am a big fan of Spring Boot. It is my preferred choice for building REST APIs in Java. It takes less than 5 minutes(given that you have Maven dependencies on your local machine) to get started with Spring Boot thanks to its auto configuration. In this blog, I will talk about a specific aspect of building REST API with Spring Boot. We will look at the request and response objects. The request object that you receive during the HTTP POST request and response object that you send in the response of HTTP GET request. I will discuss how you can keep these request and response objects to the bare minimum so that we can avoid writing and maintaining useless getters and setters.

Continue reading “Keeping Spring Boot Powered REST API Request and Response Objects Minimal”

Create a free website or blog at WordPress.com.

Up ↑