Spring Boot

Related Tags

Tutorials

Request flow from the browser through DispatcherServlet, PlaylistController, ThymeleafViewResolver and SpringTemplateEngine back to the browser as HTML

Spring Boot Thymeleaf Tutorial: Forms, Fragments, Tests

Thymeleaf renders server-side HTML pages from natural templates in a Spring Boot application. This tutorial builds a playlist app on Spring Boot 4.1.1 and Thymeleaf 3.1.5 with loops, conditions, links, validated forms, fragments, i18n and date and number formatting, and tests the views with MockMvcTester.

Spring Boot 4 Tutorial: What’s New in 4.0 and 4.1 (Examples)

Spring Boot 4 is the major release built on Spring Framework 7, Jakarta EE 11 and Jackson 3, with Java 17 as the minimum. This tutorial builds one Spring Boot 4.1.1 app that shows the modular starters, JSpecify null-safety with NullAway, API versioning, HTTP service clients with @Retryable, Jackson 3, MockMvcTester and RestTestClient tests, virtual threads, OpenTelemetry traces and the 4.1 additions, and ends with an upgrade checklist from Spring Boot 3.5.

Spring Boot Quartz Scheduler: Jobs, Triggers, JDBC Store

Schedule jobs in Spring Boot 4 with Quartz 2.5: inject Spring beans into jobs, use simple and cron triggers, handle misfires, chain jobs with listeners, persist and cluster jobs with the JDBC job store, and manage them from the actuator endpoint.

Kubernetes for Beginners: Hands-On Guide With Spring Boot

A hands-on Kubernetes guide for Java developers: deploy a Spring Boot API and PostgreSQL to a local kind cluster and learn pods, Deployments, Services, Ingress, ConfigMaps, Secrets, volumes and StatefulSets with real kubectl output.

Spring Boot: Import Excel File into Database (Apache POI)

Upload an .xlsx class roster to a Spring Boot endpoint, read it with Apache POI, validate every row with Bean Validation and save the valid rows in JDBC batches. Includes a JSON error report, duplicate checks, a SAX reader for large files with measured heap, upload limits and MockMvc tests.

Spring Boot Hibernate 7 Example with Spring Boot 4.1

Set up Hibernate 7.4 in a Spring Boot 4.1 application: the JPA starter, datasource and JPA properties, entities, Spring Data repositories, transactions, the Session API, SQL logging, tests on H2 and MySQL, and the Hibernate 7 upgrade changes.

Spring Boot Virtual Threads: Setup, Load Test and WebFlux

One property, spring.threads.virtual.enabled=true, moves Spring Boot requests, @Async methods and scheduled tasks to virtual threads. A weather API measured against platform threads and WebFlux, plus pinning and monitoring on Java 25.

[Solved] CommandAcceptanceException: Error executing DDL

1. Problem When writing tests that depend on H2 database in a Spring boot application, we may encounter the CommandAcceptanceException: Error executing DDL. The root cause exception will be org.h2.jdbc.JdbcSQLSyntaxErrorException in the logs. The exception stack trace will look something like this: If you are trying to run unit tests …

Spring Boot JpaRepository Example

Learn to Spring Data JPA module and work with JpaRepository interface for performing the CRUD operations in underlying databases in a Spring Boot application.

Creating a Jasper Report with Spring Boot

Learn to create Jasper reports in a Spring boot application, step by step, by configuring JasperReport library, loading the report templates, fill the data into reports and finally export the filled reports into a variety of formats.

Spring Boot Logging Levels Example

Learn to configure the logging levels for different packages and classes in a Spring boot application using properties, YAML and XML configurations.

Apache Kafka using Spring Boot

Learn to configure Spring boot application and Apache Kafka Producer, and Consumer, handle Kafka errors and retry in case of failures.

Spring Boot @ServiceConnection

Since Spring Boot 3.1, @ServiceConnection is used to provide connection details to a remote service that takes precedence over details in the properties file.

Deploy a Dockerized Spring Boot App to AWS

By combining the portability and flexibility of Docker containers with AWS’s reliable and scalable infrastructure, we can take our Spring Boot applications to new heights. In this comprehensive guide, we’ll show exactly how to deploy a Dockerized Spring Boot app to AWS ECS from start to finish. 1. Introduction to …

DynamoDB with Spring Boot

Learn to access DynamoDB from a Spring Boot app and perform CRUD, batch and transaction operations using DynamoDBMapper or JPA Repository.

Vue.js CRUD Application with Spring Boot

Learn to create an application from scratch using REST APIs created with Spring boot and the user interface created with Vue.js. We will build a simple employee management application with Create, Read, Update, and Delete (CRUD) functionality. 1. Application Overview In the application, the home screen will present a list …

Configure Multiple DataSources in Spring Boot

In this post, we will learn how to configure and manage multiple datasources using properties configuration and defining custom beans using Java annotations in Spring Boot. Note that this requirement differs from having separate datasource in test, dev and prod environments. Here, we are using multiple datasources in the same …

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. …

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.