博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
SpringMVC引入Thymeleaf模板引擎
阅读量:3942 次
发布时间:2019-05-24

本文共 482 字,大约阅读时间需要 1 分钟。

1. 在pom.xml中引入所需依赖

org.thymeleaf
thymeleaf
3.0.11.RELEASE
org.thymeleaf
thymeleaf-spring5
3.0.11.RELEASE

2. 在SpringMVC.xml中配置thymeleaf模板解析器

这里要注意的是,在使用thymeleaf模板是需要注释掉InternalResourceViewResolver解析器,否则会与SpringResourceTemplateResolver解析器发生冲突,导致前端页面使用的thymeleaf语法不会被解析

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-6GlwZ7s9-1601385268441)(https://i.loli.net/2020/06/10/FwSLB1JcNo84dWA.png)]

3. 这样我们就可以使用thymeleaf模板了

在这里插入图片描述

image.png

转载地址:http://aziwi.baihongyu.com/

你可能感兴趣的文章
path变量备份
查看>>
Lesson2.2 & 2.3 Maya command reference & quick help
查看>>
lesson 2.4 - Converting MEL Commands to Python
查看>>
Lesson3.2 variables
查看>>
3.4.2 - Operators & 3.4.3 division and truncation
查看>>
3.7.1 - Strings
查看>>
3.7.4 - Indexing and Slicing Strings
查看>>
3.7.5 - Modifying Strings
查看>>
3.7.6 - String Methods
查看>>
3.8 - Using the Print Function
查看>>
3.9.1 - Lists in Python
查看>>
3.9.2 - Lists - Adding and Removing Objects
查看>>
3.9.3 - Sorting Lists
查看>>
3.10 - Maya Commands: ls
查看>>
3.11 - Dictionaries in Python
查看>>
3.12 - Tuples in Python
查看>>
4.4 - For Loops
查看>>
4.2.2 - Logical and/or Operators
查看>>
Lesson 4 Part 2 Softmax Regression
查看>>
文章中运用到的数学公式
查看>>