Home » Tag Archives: Spring

Tag Archives: Spring

Secure Service-to-Service Spring Microservices with HTTPS and OAuth 2.0

spring-interview-questions-answers

“I love writing authentication and authorization code.” ~ No Java Developer Ever. Tired of building the same login screens over and over? Try the Okta API for hosted authentication, authorization, and multi-factor auth. Building a microservices architecture is possible with minimal code if you use Spring Boot, Spring Cloud, and Spring Cloud Config. Package everything up in Docker containers and ...

Read More »

Build a Reactive App with Spring Boot and MongoDB

spring-interview-questions-answers

“I love writing authentication and authorization code.” ~ No Java Developer Ever. Tired of building the same login screens over and over? Try the Okta API for hosted authentication, authorization, and multi-factor auth. Reactive apps allow you to scale better if you’re dealing with lots of streaming data. They’re non-blocking and tend to be more efficient because they’re not tying ...

Read More »

Centralized Authorization with OAuth2 & JWT using Spring Boot 2

spring-interview-questions-answers

This guide walks through the process to create a centralized authentication and authorization server with Spring Boot 2, a demo resource server will also be provided. If you’re not familiar with OAuth2 I recommend this read. Pre-req JDK 1.8Text editor or your favorite IDEMaven 3.0+ Implementation Overview For this project we’ll be using Spring Security 5 through Spring Boot. If you’re familiar with ...

Read More »

Password Encoder Migration with Spring Security 5

spring-interview-questions-answers

Recently I was working in a project that used a custom PasswordEncoder and there was a requirement to migrate it to bcrypt. The current passwords are stored as hash which means it’s not possible to revert it to the original String – at least not in an easy way. The challenge here was how to support both implementations, the old ...

Read More »

The Hypermedia APIs support in JAX-RS and OpenAPI: a long way to go

Sooner or later, most of the developers who actively work on REST(ful) web services and APIs stumble upon this truly extraterrestrial thing called HATEOAS: Hypertext As The Engine Of Application State. The curiosity of what HATEOAS is and how it relates to REST would eventually lead to discovery of the Richardson Maturity Model which demystifies the industry definitions of REST ...

Read More »

Asynchronous RDBMS access with Spring Data R2DBC

spring-interview-questions-answers

Not too long ago, a reactive variant of the JDBC driver was released. Known as R2DBC. It allows data to be streamed asynchronously to any endpoints that have subscribed to it. Using a reactive driver like R2DBC together with Spring WebFlux allows you to write a full application that handles receiving and sending of data asynchronously. In this post, we ...

Read More »

Spring Dependency Injection – Field vs Setter vs Constructor Injection

spring-interview-questions-answers

Welcome to Spring Dependency Injection – Field vs Setter vs Constructor Injection tutorial. Learn the difference between Field Injection, Setter Injection and Constructor injection. With the help of code examples, we will see the benefits of using each of them and why to chose one over the other. More on Spring Dependency Injection: Spring Setter Dependency Injection ExampleSpring Constructor Dependency ...

Read More »

Spring Field Dependency Injection Example

spring-interview-questions-answers

Learn how to write a Spring Field Injection example. The Field Injection is a type of Spring Frameworks Dependency Injection. In this tutorial we will write couple of classes and see hot the Field Injection Works. More on Spring Dependency Injection: Spring Setter Dependency Injection ExampleSpring Constructor Dependency Injection ExampleSpring Dependency Injection – Field vs Setter vs Constructor InjectionSpring Dependency ...

Read More »

Spring Constructor Dependency Injection Example

spring-interview-questions-answers

Welcome to Spring Constructor Dependency Injection Example guide. The Constructor based Dependency Injection is a type of Spring Dependency Injection. The other type of dependency injections are Setter Injection & Field Injection. More on Spring Dependency Injection: Example of Setter Injection in SpringField Injection in SpringDependency Injection – Constructor vs field injectionDependency Injection and Inversion of Control Constructor Based Dependency ...

Read More »