Different templates exist at the same time (Jsp, FreeMarker, Thymeleaf)
Template priority
FreeMarker view parser priority: Thymeleaf view parser priority: Jsp has the lowest priority
Test code
Create.01 html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<h1>01.html--thymeleaf</h1>
</ ...
Added by Diego17 on Sun, 20 Feb 2022 05:52:07 +0200
ControllerAdvice analysis description
ControllerAdvice analysis description
@What controller advice sees most is the same as exception handling. Like this one below
@ControllerAdvice
public class TestControllerAdvised {
@ExceptionHandler(value = Exception.class)
public String modelAndViewException(){
// Do some exception handling logic
}
}
When reading the source code of s ...
Added by robocop on Sat, 19 Feb 2022 16:32:20 +0200
Spring MVC learning notes
1. SpringMVC
ssm: mybatis + Spring + spring MVC MVC three-tier architecture
JavaSE: study hard and get started quickly
JavaWeb: study hard, teachers lead, and get started quickly
SSM framework: study official documents, exercise self-study ability, exercise note taking ability and exercise project ability
SpringMVC + SpringBoot + Spring ...
Added by Deltran on Sat, 19 Feb 2022 06:57:49 +0200
How spring MVC parses views
1, Parse view process
No matter what the return value type of the request processing method is, it will be encapsulated into a ModelAndView return, and then a View object will be obtained through the ViewResolve parser to render the page through the View object.
2, View and view parser
After the request processing method is executed, a Mo ...
Added by bh on Fri, 18 Feb 2022 19:53:26 +0200
Spring MVC Basics
springMVC ----HELLO word
1. Configure the development environment and import the spring MVC dependency
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>RELEASE</version>
</dependency>
< ...
Added by alexislalas on Fri, 18 Feb 2022 04:16:40 +0200
Spring MVC execution process
1. Introduction to MVC
MVC is a software design specification, which is the abbreviation of Model, View and Controller MVC is a common architecture pattern. Its purpose is to decouple! Model: the data model provides the data to be displayed on the page, also known as the business logic layer. The model layer is a broad overview. The model l ...
Added by rebelo on Thu, 10 Feb 2022 22:04:42 +0200
SSM framework integration
SSM framework integration
SSM framework includes spring, spring MVC and Mybatis. Spring and spring MVC are both modules of the Spring Framework and do not need to be integrated. Just integrate Mybatis with spring
1, Integration concerns
Application of Spring in web project When the web project starts, read ApplicationContext MXL configurat ...
Added by bigc79 on Thu, 10 Feb 2022 18:02:34 +0200
3, Annotation version and configuration version of spring MVC
(the notes of the article are from the video of station b. when you meet the crazy God, you can carry the notes as a study for your reference and study together)
Configuration version
1. Create a new Moudle, springmvc-02-hello, and add web support!
2. Make sure the dependency of spring MVC is imported!
3. Configure web XML, register Dispatc ...
Added by rubio on Thu, 10 Feb 2022 00:04:45 +0200
Spring MVC project construction
Spring MVC project construction
IDEA version: 2021.1 (the operation steps of each version are roughly the same)
1. Create an empty project and create a web module under the project
Exit the current project:
Choose to create an empty project:
Select project name and location:
After the empty project is completed, we choose to creat ...
Added by Ree on Wed, 02 Feb 2022 21:12:42 +0200
SpringBoot day 16 - Web exception handling
SpringBoot - Web exception handling
Understand the exception handling mechanism of SpringBoot for Web development.
1. Exception handling mechanism
1.1 default exception handling
By default, SpringBoot provides / error mapping to handle all exceptions, And register as a global error handling page in the Servlet container.
For browser client ...
Added by ochi on Tue, 01 Feb 2022 14:46:03 +0200