Spring WebMVC

Spring Boot RestClient (with Examples)

Starting Spring Framework 6.1 and Sring Boot 3.2, we can use the Spring RestClient for performing HTTP requests using a fluent and synchronous API. The RestClient works over the underlying HTTP client libraries such the JDK HttpClient, Apache HttpComponents, and others. As the name suggests, RestClient offers the fluent API design …

Spring MVC

Spring WebMVC (or Spring MVC) contains Spring’s model-view-controller (MVC) and REST Web Services implementation for web applications.

@GetMapping and @PostMapping in Spring Boot (with Examples)

In Spring, @GetMapping maps HTTP GET requests and @PostMapping maps HTTP POST requests to controller methods. Both are shortcuts for @RequestMapping with a fixed HTTP method. See a working Spring Boot REST controller, the @RequestMapping equivalent and the attributes that narrow a mapping.

Spring HandlerInterceptor Example

Spring HandlerInterceptor allows creating interceptors in Spring or Boot applications to handle requests pre- and post-controller methods.

Spring MVC Hello World Example (Spring Boot 4, Thymeleaf)

A complete Spring MVC hello world application on Spring Boot 4.1.1 and Java 25: a @Controller with @RequestParam and @PathVariable, a Thymeleaf template, static CSS, MockMvc tests, and fixes for the Whitelabel 404/500 and “Circular view path” errors.

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.