Home » Tag Archives: Spring Boot (page 3)

Tag Archives: Spring Boot

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 »

How to use profiles in Spring Boot Application

spring-interview-questions-answers

Hello Friends, In this tutorial,we will learn,how we can use profiles in a Spring Boot Application. We will discuss following points in this tutorial : 1. What is Spring Boot Profile and Why we need Profiling2. How to do Profiling in Spring Boot with Example3. How to set/change the default profile1. What is Spring Boot Profile and Why we need ...

Read More »

Java Microservices with Spring Cloud Config and JHipster

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. Developing a microservice architecture with Java and Spring Boot is quite popular these days. It’s definitely one of the most popular combinations in the Java ecosystem. If you need any ...

Read More »

Spring with Rails’ jQuery UJS

I’ve always wanted to try to see if I could use Rails’ jQuery UJS in a Spring Boot project. The UJS in jquery-ujs stands for unobtrusive JavaScript. I really like how UJS wires event handlers to eligible DOM elements marked with HTML5 data-* attributes. I find myself wanting to see more of this approach being used in Spring Boot web ...

Read More »