Spring Boot MVC REST Controller Example & Unit Tests
Learn to create a REST API controller using @RestController in a Spring Boot application, and add method validation, error handling and unit tests.
Learn to create a REST API controller using @RestController in a Spring Boot application, and add method validation, error handling and unit tests.
Learn to create generic and custom error pages for specific HTTP error codes in a Spring Boot application with configuration examples.
Learn to use Spring WebMvcConfigurer to customize various aspects of Spring MVC, such as argument resolvers, view resolvers, exception handling, and more.
Learn about Spring @PathVariable and @RequestParam annotations and compare them with Jakarta’s @PathParam and @QueryParam annotations.
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 …
Learn about top 5 template engines for Spring MV applications, comparing their features and setup process, to make more informed decisions.
Learn why we need a custom validation annotation and how to create, use and test such a custom validation annotation in Spring MVC.
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 WebMVC (or Spring MVC) contains Spring’s model-view-controller (MVC) and REST Web Services implementation for web applications.
Learn to create Spring MVC controllers and map requests with request mapping annotations e.g. @RequestMapping, @GetMapping, @PostMapping, @PutMapping, @DeleteMapping and @PatchMapping.
In Spring MVC and Hibernate configuration example, learn to create form-based CRUD application that validates and persists data into database.
In Spring Boot 3 JSP example, learn to configure the Spring MVC with JstlView.class and serve JSP pages with static content and triage some common issues.
Spring HandlerInterceptor allows creating interceptors in Spring or Boot applications to handle requests pre- and post-controller methods.
Spring MVC tutorial discusses the MVC pattern, front controller pattern, and building blocks of Spring MVC framework with a hello world application.
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.