Spring Boot

Related Tags

Tutorials

Spring Boot – Separate DataSource for Test, Dev and Prod

Learn to configure and use different DataSource in different environments (test, development, production etc.) using the Spring profile specific properties files, as well as Java configuration in a Spring boot application. 1. Introduction A production grade application is deployed and tested in different environments before finally released to the end-user. …

Guide to RSocket using Spring Boot

Learn the RSocket protocol and implement communication models in Spring boot using reactive types such as Mono and Flux with examples.

Spring Boot and GraphQL Tutorial

Learn the core concepts of GraphQL and running an example Spring Boot application with GraphQL integrated for querying and updating the data.

Spring Boot Gradle Plugin

Spring Boot Gradle plugin provides support for Spring Boot applications using Gradle as the build automation tool that helps in dependency management and application packaging.

Springdoc OpenAPI: Swagger UI for Spring Boot REST APIs

Springdoc OpenAPI generates the OpenAPI 3 document and the Swagger UI page for a Spring Boot REST API from one starter dependency. Default URLs, springdoc.* properties, Swagger annotations, groups, security scheme and how to switch the docs off in production.

What’s New in Spring 6 and Spring Boot 3

Learn about the new features and changes introduced in Spring 6 and Spring boot 3 such as baseline upgrade to Java 17 and removing all deprecated classes, methods and properties.

Caffeine Cache with Spring Boot

Learn about Caffeine Cache and how we can use Caffeine with Spring Boot. Learn to configure caching, add and evict cache entries with example

Spring Boot Filter: with Order and URL Pattern Examples

In this Spring boot tutorial, we will learn to create, order and register servlet filters in different ways including Filter interface, @WebFilter annotation and inbuilt filter bean classes. 1. Introduction In a web application, we must implement the javax.servlet.Filter interface (jakarta.servlet.Filter in Spring Boot 3) to create filters that can …

Spring Boot Tutorial

Learn Spring Boot with the following in-depth tutorials, covering from basic to advanced concepts such as packaging and monitoring.

Spring Boot Profiles

Learn about Spring profiles, @Profile, profile-specific beans and properties, profile groups and activating a certain profile during startup.

Accessing Properties in Spring Boot

Learn to use @PropertySource, @Value and @ConfigurationProperties annotations to register property files and inject configuration properties.

Spring Boot Tests for Controller, Service and Dao Layers

Testing a Spring Boot application means checking each layer on its own, the controller, the service and the repository, and then checking all layers together. Spring Boot supports these tests with slice annotations such as @WebMvcTest and @DataJpaTest, which test one layer, and with @SpringBootTest, which starts the application. The …

@Repository Annotation in Spring Boot

Spring boot @Repository annotation is a specialization of the @Component to indicate a data repository used for storage, retrieval, and search behavior.

Spring Boot Interview Questions and Answers Explained

Spring boot makes application development easier but we may face some tough interview questions when it comes to test your knowledge on how it all works. Be prepare for the next job interview with given Spring boot interview questions and answers.

Spring Boot DataSource Configuration with HikariCP Examples

Configure a DataSource in Spring Boot 4 with spring.datasource.url, username and password, and Spring Boot creates a HikariCP pool. Tested examples for pool tuning, DataSourceBuilder, a second DataSource, schema.sql and data.sql, and tests with H2 and Testcontainers.

Spring Boot REST: Consuming and Producing JSON with Jackson

Produce JSON from @RestController methods and consume it with @RequestBody in Spring Boot 4 with Jackson 3. Covers the 400, 415 and 406 errors, Jackson 3 defaults, spring.jackson properties, a JsonMapperBuilderCustomizer, annotations, Gson and tests.

Integration Testing with @SpringBootTest and JUnit 5

The @SpringBootTest annotation in Spring Boot allows us to create integration tests by loading the entire application context. It acts as a bridge between the application configuration and the test framework so that tests can verify the behavior of your application in an environment similar to production.

Spring Boot 3 with JUnit 5

Learn to include JUnit 5 in a Spring boot application and write unit tests. Check out a demo of JUnit 5 tests for Spring Boot REST controller.

Use Gson with Spring Boot 4

Use Gson with Spring Boot 4.1.2. Compare an injected Gson bean with MVC JSON responses, customize LocalDate, and select Gson for the message converter.

Disable the Spring Boot Startup Banner

Turn off the Spring Boot startup banner with properties, a launch argument, or SpringApplication. See verified Spring Boot 4.1.2 output and how overrides work.

Spring Boot Console Logging

Learn to use and configure logging to console in spring boot application. Also learn to configure and use console appenders available in logback and log4j2.

About Us

HowToDoInJava provides tutorials and how-to guides on Java and related technologies.

It also shares the best practices, algorithms & solutions and frequently asked interview questions.