(3) SpringBoot -- template engine thymeleaf

1, Template engine supported by SpringBoot 1. Tymeleaf (official recommendation) 2,FreeMarker 3,Groovy 4,mustache   Why isn't JSP recommended for SpringBoot? 1. JSP is more intrusive to the page. 2. The management of web container version.   2, About thymeleaf Perfect separation of front and back ends   3, Realize MVC The document ...

Posted on Fri, 03 Apr 2020 00:21:19 -0700 by Saphod

Leyou mall project -- day14 thymeleaf and static

1. Commodity details When a user searches for a product, he will definitely click view to enter the product details page. Next, we will complete the display of the product details page, 1.1.Thymeleaf In the product details page, we will use Thymeleaf to render the page, so we need to understand th ...

Posted on Thu, 27 Feb 2020 01:45:05 -0800 by ghazianibros

Developers recommend reading: Internationalization support practices in the Spring Boot architecture

Prig Boot adds dependencies by inheritance mainly through a build system like Maven or Gradle, while inheriting the excellent elements of the Spring framework, reducing the complex configuration in the Spring MVC architecture. Built-in Tomcat, Jetty containers, running programs using Java application s instead of traditionally placing WAR pack ...

Posted on Tue, 17 Dec 2019 19:25:55 -0800 by please_explain

Spring boot server form data verification

POM dependence <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.5.10.RELEASE</version> </parent> <properties> <java.version>1.8</java.version> <thymeleaf.version>3.0.2.RELEASE</ ...

Posted on Tue, 03 Dec 2019 12:58:26 -0800 by stickynote427

Wechat authorization is the principle. Spring Cloud OAuth2 authorization code mode

Last article Spring Cloud OAuth2 single sign on This paper introduces the use of password mode for identity authentication and single sign on. This article introduces another authorization mode of Spring Cloud OAuth2 - authorization code mode. The authentication process of authorization code mode is as follows: 1. The user client requests the ...

Posted on Wed, 06 Nov 2019 18:46:24 -0800 by darksniperx

Tymeleaf common syntax: using asterisk expressions

When dealing with templates, the variable expression ${...} is generally used to display variables, and the selected object expression * {...}, also known as the asterisk expression, is also used.If the object is selected first in the template, you need to use an asterisk expression. The built-in object effect of Thymeleaf is equivalent to an a ...

Posted on Fri, 18 Oct 2019 10:36:12 -0700 by pspfreak101

Thymeleaf Common Grammar: Operator of Expressional Grammar

The constants of Thymeleaf expression grammar are divided into string constants, number constants, Boolean constants and null constants.Operators are divided into arithmetic operators, relational operators, conditional operators and no operators. Development environment: IntelliJ IDEA 2019.2.2Spring Boot version: 2.1.8 Create a new Spring Boo ...

Posted on Mon, 14 Oct 2019 11:39:34 -0700 by TalonFinsky

Use of Thymeleaf objects: string objects

Thymeleaf mainly uses the class org.thymeleaf.expression.Strings to process strings, and the # strings object to process strings in templates. Development environment: IntelliJ IDEA 2019.2.2Spring Boot version: 2.1.8 Create a new Spring Book project named demo. 1,pom.xmlAdding Thymeleaf dependencies <dependency> ...

Posted on Sun, 13 Oct 2019 04:45:47 -0700 by msandersen

Spring-boot integrates mybatis + spring MVC

Spring-boot integrates mybatis + spring MVC Let me give you an example of adding data to the background. 1. New maven project, import dependencies <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/ ...

Posted on Mon, 07 Oct 2019 15:24:24 -0700 by 44justin

editormd generates blog editing pages

<!DOCTYPE html> <html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4"> <head> <meta charset="UTF-8"> <title>write an article</title> <link rel="stylesheet" href="https://amaze ...

Posted on Sun, 06 Oct 2019 18:15:52 -0700 by dlf