Home » Tag Archives: Spring Boot (page 3)

Tag Archives: Spring Boot

Spring Boot CommandLineRunner and ApplicationRunner

spring-interview-questions-answers

In this quick tutorial, we’ll explore the two very popular interfaces in Spring Boot: CommandLineRunner and ApplicationRunner. One common use case of these interfaces is to load some static data at application startup. Though, I have seen such usages mostly for test data setup only. Both of them are functional interfaces with a run() method. This run() method gets executed soon ...

Read More »

Introduction to Spring Boot

spring-interview-questions-answers

In this tutorial, we’ll take a look at Spring Boot and see how it’s different from the Spring framework. We’ll also discuss various features offered by Spring Boot. What is the Spring Boot? Spring is a powerful framework when it comes to developing enterprise-level applications. It provides us with features like dependency injection along with supporting many other framework extensions. ...

Read More »

Monitor Your Java Apps with Spring Boot Actuator

spring-interview-questions-answers

Friends don’t let friends write user auth. Tired of managing your own users? Try Okta’s API and Java SDKs today. Authenticate, manage, and secure users in any application within minutes. Have you worked with Spring Boot Actuator yet? It’s an immensely helpful library that helps you monitor app health and interactions with the app – perfect for going to production! ...

Read More »

How-To: Spring Boot 2 Web Application with Multiple Mongo Repositories and Kotlin

First of all, a disclaimer: if you’re writing a microservice (which everyone does now right?) and want it to be idiomatic, you don’t normally use several different data sources in it. Image taken from Pixabay © https://pixabay.com/illustrations/software-binary-system-1-0-binary-557616/ Why? Well, by definition, microservices should be loosely coupled, so that they can be independent. Having several microservices writing into the same database really ...

Read More »

Dockerizing a Spring Boot Application

Hello Friends, In this tutorial,we will see how we can dockerize our Spring Boot Application.By dockerizing ,we mean that we are going to run our application as docker container. Following are the steps involved : 1. Create a Spring Boot Application2. Install Docker on your machine3. Create a Docker file in your project4. Docker build using docker file5. Docker run ...

Read More »

Chicken and egg – resolving Spring properties ahead of a test

spring-interview-questions-answers

Consider a service class responsible for making a remote call and retrieving a detail: 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 ... public class CitiesService {     private final WebClient.Builder webClientBuilder;     private final String baseUrl;       public CitiesService(             WebClient.Builder webClientBuilder,             @Value("${cityservice.url}") String baseUrl) {         this.webClientBuilder = webClientBuilder;         this.baseUrl = baseUrl;     } ...

Read More »

Testing Spring Boot conditionals the sane way

spring-interview-questions-answers

If you are more or less experienced Spring Boot user, it is very luckily that at some point you may need to run into the situation when the particular beans or configurations have to be injected conditionally. The mechanics of it is well understood but sometimes the testing such conditions (and their combinations) could get messy. In this post we ...

Read More »

Simple Authentication with Spring Security

spring-interview-questions-answers

Friends don’t let friends write user auth. Tired of managing your own users? Try Okta’s API and Java SDKs today. Authenticate, manage, and secure users in any application within minutes. Authentication is vital to all but the most basic web applications. Who is making the request, wanting data, or wanting to update or delete data? Can you be sure that ...

Read More »