Administrator

Lokesh Gupta

Lokesh Gupta is a Java developer with more than 20 years of experience and the founder of HowToDoInJava, which he started in 2012. He has worked on Java and Spring applications at Hewitt Associates, Hughes Systique, Adobe and Bank of America. The site has over 1,600 tutorials on Java, Spring Boot, Hibernate, testing and TypeScript. Every example is run and verified before it is published, and the source code is on GitHub.

Website: https://howtodoinjava.com

Github: https://github.com/lokeshgupta1981/

Twitter: @HowToDoInJAVA

LinkedIn: https://www.linkedin.com/in/lokeshgupta1981/

My Articles:

Spring WebClient: GET and POST Examples (Spring Boot 4)

Spring WebClient is the non-blocking HTTP client of Spring WebFlux. Examples on Spring Boot 4 show GET with bodyToMono and bodyToFlux, POST with a JSON body, onStatus error handling, timeouts, block() vs subscribe(), logging, and tests with MockWebServer.

Spring HATEOAS Pagination Links

Learn to build automatic pagination links (next, prev) in spring boot hateaos application using PagedModel and PagedResourcesAssembler classes.

Spring Boot HATEOAS

Learn to build hateoas links for REST resources using RepresentationModel and RepresentationModelAssemblerSupport in a Spring boot application example.

Spring Batch Partitioning into Multiple Steps

Partitioning in Spring Batch splits the data of one step into separate ranges, and a worker step processes each range in its own thread. We use it when a single thread takes too long to read and process a large number of records, for example millions of rows in a …

@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 Annotations List

Learn about the most widely used spring annotations. In this tutorial, we will briefly cover the important annotations which are provided by spring core to define beans and create complex application context configurations. 1. Annotations in Spring Framework Similar to other places, annotations help by providing metadata and instructions to …

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.

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.