Home » Tag Archives: Spring Boot (page 2)

Tag Archives: Spring Boot

Unit test for Spring’s WebClient

WebClient to quote its Java documentation is Spring Framework’sNon-blocking, reactive client to perform HTTP requests, exposing a fluent, reactive API over underlying HTTP client libraries such as Reactor Netty. In my current project I have been using WebClient extensively in making service to service calls and have found it to be an awesome API and I love its use of ...

Read More »

Spring Boot: Building a RESTful Web Application

spring-interview-questions-answers

Introduction: REST stands for Representational State Transfer and is an architectural guideline for API design. We assume that you already have a background in building RESTful APIs. In this tutorial, we’ll design a simple Spring Boot RESTful web application, exposing a few REST endpoints. Project Setup: Let’s start by downloading the project template via Spring Initializr: We only need to ...

Read More »

Augmenting a Spring Data repository through delegation

I have recently written several posts about Kotlin’s delegation. In doing so, I realised a useful way to apply it to Spring Data repositories. Which would allow Spring Data to continue sprinkling some magic while providing a route for customisation. The code shown in this post is in Kotlin, but is still relevant to Java. This post uses R2DBC, but ...

Read More »

Spring Boot with H2 Database

spring-interview-questions-answers

In this quick tutorial, we’ll bootstrap a simple Spring Boot application backed by an in-memory H2 database. We’ll use the Spring Data JPA to interact with our database. Project Setup: Firstly, let’s generate our project template using Spring Initializr: On clicking the ‘Generate the project’ link, our project files will get downloaded. Now, if we look closely at the generated ...

Read More »

Build Mobile Apps with Angular, Ionic 4, and Spring Boot

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. I’m a big fan of Ionic. I started using it several years ago when it was based on AngularJS. As a developer, I really liked it because I knew Angular. ...

Read More »

@SpringBootConfiguration Annotation in Spring Boot

spring-interview-questions-answers

@SpringBootConfiguration annotation in Spring Boot is a class-level annotation which indicates that this class provides the application configuration. Generally, the class with the main() method is best-suited for this annotation. We usually use @SpringBootApplication annotation which automatically inherits the @SpringBootConfiguration annotation. Annotation Usage: When we mark a class with @SpringBootConfiguration, it means that the class provides @Bean definition methods. The ...

Read More »

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 »