SpringBoot series of tutorials (70): SpringBoot Controller's four methods return value types

I. Introduction

The three mainstream frameworks of Spring, SpringMVC, and SpringBoot have become the necessary development and use frameworks in the Java Web development community and are used by developers.

  • SpringIs a one-stop lightweight java development framework, the core is inversion of control (IOC) and aspect-oriented (AOP), for the development of the WEB layer (springMvc), business layer (Ioc), persistence layer (jdbcTemplate) It provides a variety of configuration solutions; it
    SpringMVCis an MVC framework based on spring, which mainly deals with the path mapping and view rendering of web development, and is part of the WEB layer development in the spring framework;
  • SpringBootCompared with SpringMVC, it focuses more on the development of back-end interfaces, simplifies the project development and configuration process, and can quickly develop a single microservice. Spring Boot implements automatic configuration, which reduces the complexity of integration between Spring and SpringMVC frameworks in the original project.

No matter how the framework changes, as long as the Spring Family Bucket framework is used, Spring MVC is an indispensable part. Do you know how Spring MVC has multiple return values ​​for different scenarios? Next, I will summarize SpringMVC's different return value methods for different scenarios.

1.1 Complete project structure

Guess you like

Origin blog.csdn.net/Thinkingcao/article/details/108152297