Home » Tag Archives: Spring (page 2)

Tag Archives: Spring

Bootiful Development with Spring Boot and React

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. React has been getting a lot of positive press in the last couple years, making it an appealing frontend option for Java developers! Once you learn how ...

Read More »

Spring, Reactor and ElasticSearch: bechmarking with fake test data

spring-interview-questions-answers

In the previous article we created a simple adapter from ElasticSearch’s API to Reactor’s Mono, that looks like this: import reactor.core.publisher.Mono; private Mono indexDoc(Doc doc) { //... } Now we would like to run this method at controlled concurrency level, millions of times. Basically, we want to see how our indexing code behaves under load, benchmark it. Fake data with jFairy First, we ...

Read More »

Spring, Reactor and ElasticSearch: from callbacks to reactive streams

spring-interview-questions-answers

Spring 5 (and Boot 2, when it arrives in a couple of weeks) is a revolution. Not the “annotations over XML” or “Java classes over annotations” type of revolution. It’s truly a revolutionary framework that enables writing a brand new class of applications. Over the recent years, I became a little bit intimidated by this framework. “Spring Cloud being framework that ...

Read More »

Secure Your Spring Boot Web App with Single Sign-on from Okta

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. You can spin up an enterprise-quality REST server with complete user identity and authorization management in less than 20 minutes, with SpringBoot and Okta. Spring Boot and ...

Read More »

DataSource Routing with Spring @Transactional

spring-interview-questions-answers

I was inspired by Carl Papa’s use of aspects with the Spring Framework to determine the DataSource to use (either read-write or read-only). So, I’m writing this post. I must admit that I have long been familiar with Spring’s AbstractRoutingDataSource. But I did not have a good idea where it can be used. Thanks to Carl and team, and one ...

Read More »

Power Up Your Data Model With Projections

spring-interview-questions-answers

Introduction Data models can be tricky. Modelling can be even harder. Sometimes information that should go into a database table isn’t necessarily what we want to go out to every piece of code. And like so many other times, Spring comes to the rescue. A little feature called projection helps us to map data with only a few lines in ...

Read More »

Spring Webflux – Writing Filters

spring-interview-questions-answers

Spring Webflux is the new reactive web framework available as part of Spring 5+.  The way filters were written in a traditional Spring MVC based application(Servlet Filter, HandlerInterceptor) is very different from the way a filter is written in a Spring Webflux based application and this post will briefly go over the WebFlux approach to Filters. Approach 1 – WebFilter The first ...

Read More »

Difference between @Component, @Service, @Controller, and @Repository in Spring

spring-interview-questions-answers

Before you learn the difference between @Component, @Service, @Controller, and @Repository annotations in Spring framework, it’s important to understand the role of @Component annotation in Spring. During initial release of Spring, all beans are used to be declared in an XML file. For a large project, this quickly becomes a massive task and Spring guys recognize the problem rather quickly. ...

Read More »