How to Configure MyBatis with Spring Boot
Learn to configure MyBatis with Spring Boot 3 and configure @Mapper and DataSource. Also, learn mapper scanning with @MapperScan with example.
Learn to configure MyBatis with Spring Boot 3 and configure @Mapper and DataSource. Also, learn mapper scanning with @MapperScan with example.
Learn the core concepts of GraphQL and running an example Spring Boot application with GraphQL integrated for querying and updating the data.
In this Spring boot with Angular tutorial, learn to create REST APIs using Spring boot and call from Angular to create a CRUD application.
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 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.
Learn different ways to configure a Spring Boot non-web application that starts without an embedded Web server such as tomcat or jetty.
Learn about Caffeine Cache and how we can use Caffeine with Spring Boot. Learn to configure caching, add and evict cache entries with example
Learn Spring Boot with the following in-depth tutorials, covering from basic to advanced concepts such as packaging and monitoring.
Learn about Spring profiles, @Profile, profile-specific beans and properties, profile groups and activating a certain profile during startup.
Learn to use @PropertySource, @Value and @ConfigurationProperties annotations to register property files and inject configuration properties.
HikariCP is a lightweight JDBC connection pool. Learn about various options for configuring the HikariCP with Spring boot JPA and hibernate.
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.
Learn to enable HTTP response gzip compression in a Spring Boot application. By default, the gzip compression is disabled in Spring Boot.
Learn to read a file from the ‘/resources’ folder in a Spring boot application using ClassPathResource, ResourceLoader interfaces and @Value.
Learn to build a robust Spring Boot application with Hibernate, covering CRUD operations, paging, filtering, caching, and best practices.
Learn to pass and retrieve the command line arguments in a Spring boot application using ApplicationArgument injection and @Value annotation.
Learn to write spring boot async rest controller using SseEmitter which is a specialization of ResponseBodyEmitter for sending Server-Sent Events.
Learn to write spring boot async rest controller which support async request processing and returning the response using Callable interface.
In Spring Boot 3 REST POST API tutorial, create an HTTP POST REST API, return the API response and add validations for the request body.
Learn to use Spring retry module for implementing retry-based remote API invocations that can handle runtime exceptions or network failures.
Spring Batch example with Spring Boot 4 and Spring Batch 6. We read a CSV file into an H2 table with a chunk-oriented step, run the job on startup and on demand with job parameters, skip bad lines, restart a failed run and test the job with JobOperatorTestUtils.
Learn to use Spring @Async with @EnableAsync to create non-blocking REST controllers in a Spring Boot application.
In this Spring Boot HATEOAS example, we will learn to add HATEOAS (Hypertext as the Engine of Application State) links to resource representations returned from REST APIs in a Spring boot application. 1. What is HATEOAS? HATEOAS is one of the constraints of the REST architectural style first presented by …
Learn to create fat or uber jar or war build for spring boot applications using the spring-boot-maven-plugin with an example.
Learn how to use Spring Boot CommandLineRunner interface with examples, and how it is different from the ApplicationRunner interface.
Spring Boot bundles Tomcat and Jetty dependencies as separate starters to make easy switching them using configurations and properties.
By default, Spring boot embedded server starts at port 8080. Learn to change the default port using Java configuration, command line, and properties.
Spring Boot JSP example: add tomcat-embed-jasper and the Jakarta JSTL artifacts, set spring.mvc.view.prefix and suffix, use war packaging, and render a list page and a form with embedded Tomcat.
Spring @ExceptionHandler methods handle exceptions in one controller, and the same methods in a @ControllerAdvice class handle them for every controller. Learn the difference, return ProblemDetail (RFC 9457) bodies, handle validation errors and @ResponseStatus, and test each handler with MockMvc on Spring Boot 4.
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.