This article shows you what @Controller and @RestController are and their differences. Table of contents: 1. Spring @Controller annotation 2. Spring @RestController annotation 3. Download Source Code 4. References 1. Spring @Controller annotation Spring 2.5 introduced the @Controller as the web controller for the MVC architecture. Spring 3.0 introduced the @ResponseBody to return the method’s […]

Read more Spring @Controller and @RestController Annotations

This tutorial shows you how to create a Spring Web MVC application with the Thymeleaf template. Technologies and tools used: Java 11 Spring 5.2.22.RELEASE Thymeleaf 3.0.15.RELEASE Embedded Jetty Server 9.4.45.v20220203 Servlet API 4.0.4 Bootstrap 5.2.0 (webjars) IntelliJ IDEA Maven 3.8.6 Spring Test 5.2.22.RELEASE Hamcrest 2.2 JUnit 5.9 Table of contents: 1. Spring Web MVC Basic […]

Read more Spring MVC hello world example (Maven and Thymeleaf)