Home » Tag Archives: Spring (page 5)

Tag Archives: Spring

Spring Async and Java’s 8 CompletableFuture

spring-interview-questions-answers

It is known that I am not the biggest fan of Spring, but at the time being I work for an organization that maintains too many projects utilizing Spring (in different forms and versions). I still remain skeptic towards Spring, of course there are some very nice ideas, there are some nice (too many) abstractions, there are some very handy ‘shortcuts’ ...

Read More »

First steps to Spring Boot Cassandra

apache-cassandra-logo

If you want to start using Cassandra NoSQL database with Spring Boot, the best resource is likely the Cassandra samples available here and the Spring data Cassandra documentation. Here I will take a little more roundabout way, by actually installing Cassandra locally and running a basic test against it and I aim to develop this sample into a more comprehensive example with the next ...

Read More »

Spring Oauth2 with JWT Sample

spring-interview-questions-answers

Sometimes ago, we published one article sharing a custom approach to implement stateless session in cloud environment. Today, let explore another popular use case of setting up Oauth2 authentication for a Spring Boot application. In this example, we will JSON Web Token (JWT) as the format of the Oauth2 token. This sample was developed partly based on the official sample of ...

Read More »

Integration Architecture with Java EE and Spring

spring-interview-questions-answers

The O’Reilly Software Architecture Conference in New York happens this week. And I had the pleasure to give a tutorial together with Josh Long about how to integrate Java EE and Spring. We’ve been joking about this one since a while. The super stupid biased view onto both technologies which some people have in mind was something that bugged both of ...

Read More »

Data aggregation with Spring Data MongoDB and Spring Boot

java-interview-questions-answers

MongoDB aggregation framework is designed for grouping documents and transforming them into an aggregated result. The aggregation query consists in defining several stages that will be executed in a pipeline. If you are interested in more in-depth details about the framework, then mongodb docs are a good point to start. The point of this post is to write a web ...

Read More »

Spring MVC: Trgger manual validation of a form object

spring-interview-questions-answers

Sometimes it may be needed to use manual validation in Spring MVC @Controller. This is very simple with Spring’s org.springframework.validation.ValidationUtils class. Learn how to invoke a validator in two different scenarios.             Scenario 1 – invoke validation In this scenario, I have a user form with username field. Username field is validated with custom validator ...

Read More »

Retry handling with Spring-Retry

spring-interview-questions-answers

Whenever software components communicate with each other, there is a chance for temporary self-correcting faults. Such faults include the temporary unavailability of a service, momentary loss of network connectivity, or timeouts that arise when a service is busy. In such situations a proper retry handling can reduce the problems these faults might cause. In this post we will see how ...

Read More »

Read property files with PropertyPlaceholderConfigurer

spring-interview-questions-answers

1. Introduction Usually when we are concerned with multiple servers where the application is deployed before going into production, we can configure the environment-specific parameters in an external property file. It might be the database details, which is different for test server and the production server. So it’s better we we choose to keep the database configuration file in an external property file. Similarly, we can choose ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns