Home » Spring Boot » Page 18

Tag Archives: Spring Boot

Integrating Swagger with Spring Boot REST API

spring-interview-questions-answers

In the last post, I talked about my experience with creating RESTFul Services using Spring Boot. When creating a REST API, proper documentation is a mandatory part of it. What is Swagger? Swagger(Swagger 2) is a specification for describing and documenting a REST API. It specifies the format of the REST web services including URL, Resources, methods, etc. Swagger will generate ...

Read More »

Building a RESTFul Service using Spring Boot

java-interview-questions-answers

Everyone is talking about Microservices such as WSO2 Microservice Framework, Spring Boot, etc. Since I haven’t worked on any Spring related project since a very long time, I thought to implement a simple RESTFul service using Spring Boot. So I started with Spring documentation. It is straightforward.  You can create the structure of your project using “Spring Initializr“. This is an online ...

Read More »

Spring Webflux – Kotlin DSL – a walkthrough of the implementation

In a previous blog post I had described how Spring Webflux, the reactive programming support in Spring Web Framework, uses a Kotlin based DSL to enable users to describe routes in a very intuitive way. Here I wanted to explore a little of the underlying implementation. A sample DSL describing a set of endpoints looks like this: package sample.routes import org.springframework.context.annotation.Bean ...

Read More »

Spring Cloud Tutorials – Auto Refresh Config Changes using Spring Cloud Bus

java-interview-questions-answers

Problem In the previous article Introduction to Spring Cloud Config Server(http://sivalabs.in/2017/08/spring-cloud-tutorials-introduction-to-spring-cloud-config-server/) we have seen how to use Spring Cloud Config Server. But, the problem is to reload the config changes in Config Client applications we need to trigger /refresh endpoint manually. This is not practical and viable if you have large number of applications. Solution Spring Cloud Bus module can be used to link ...

Read More »

Spring Cloud Tutorials – Introduction to Spring Cloud Config Server

java-interview-questions-answers

Problem SpringBoot provides lot of flexibility in externalizing configuration properties via properties or YAML files. We can also configure properties for each environment (dev, qa, prod etc) separately using profile specific configuration files such as application.properties, application-dev.properties, application-prod.properties etc. But once the application is started we can not update the properties at runtime. If we change the properties we need to restart the application ...

Read More »

Spring Boot with the Justice League

java-interview-questions-answers

Dark times are ahead for the Justice League with the formidable Darkseid coming over to conquer human kind. Batman with the help of Wonder woman are on a quest to get the league together with one critical aspect missing. A proper Justice league member management system. As time is not on their side, they do not want to go through ...

Read More »

Simple Spring Boot Admin Setup

java-interview-questions-answers

Spring Boot Admin is a cool dashboard for monitoring your spring boot applications. However, setting it up is not that trivial. The documentation outlines two options: Including a client library in your boot application that connects to the admin application – this requires having the admin application deployed somewhere public or at least reachable from your application, and also making ...

Read More »

Spring Boot Web Slice test – Sample

java-interview-questions-answers

Spring Boot introduced test slicing a while back and it has taken me some time to get my head around it and explore some of its nuances. Background The main reason to use this feature is to reduce the boilerplate. Consider a controller that looks like this, just for variety written using Kotlin. @RestController @RequestMapping("/users") class UserController( private val userRepository: UserRepository, private val ...

Read More »