• SpringBoot thymeleaf模板版本,thymeleaf模板更换版本


    SpringBoot thymeleaf模板版本

    thymeleaf模板更换版本

    修改thymeleaf模板版本

    ================================

    ©Copyright 蕃薯耀 2018年3月27日

    http://www.cnblogs.com/fanshuyao/

    一、SpringBoot 使用thymeleaf模板需要引用依赖的Jar包:

    Xml代码  收藏代码
    1. <dependency>  
    2.   <groupId>org.springframework.boot</groupId>  
    3.   <artifactId>spring-boot-starter-thymeleaf</artifactId>  
    4. </dependency>  

    二、SpringBoot中thymeleaf的默认版本为:1.5.10.RELEAS

    Java代码  收藏代码
    1. <dependency>  
    2.   <groupId>org.springframework.boot</groupId>  
    3.   <artifactId>spring-boot-starter-validation</artifactId>  
    4.   <version>1.5.10.RELEASE</version>  
    5. </dependency>  

    三、修改thymeleaf模板的版本

    properties标签加入如下配置:

    Java代码  收藏代码
    1. <properties>  
    2.   <thymeleaf.version>3.0.2.RELEASE</thymeleaf.version>  
    3.   <thymeleaf-layout-dialect.version>2.0.4</thymeleaf-layout-dialect.version>  
    4. </properties>  

     示例如下:

    Xml代码  收藏代码
    1. <properties>  
    2.   <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>  
    3.   <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>  
    4.   <java.version>1.8</java.version>  
    5.   <thymeleaf.version>3.0.2.RELEASE</thymeleaf.version>  
    6.   <thymeleaf-layout-dialect.version>2.0.4</thymeleaf-layout-dialect.version>  
    7. </properties>  

    注意:thymeleaf 版本3已经重写,thymeleaf-layout-dialect必须为2以上的版本

    (如果你觉得文章对你有帮助,欢迎捐赠,^_^,谢谢!) 

    ================================

    ©Copyright 蕃薯耀 2018年3月27日

    http://www.cnblogs.com/fanshuyao/

  • 相关阅读:
    [导入]如何在SQL Server2000中处理半个汉字的问题(转)
    [导入]ASP访问Access数据表的一些属性
    [导入]下面为转载的对于招行安全控件的分析
    [导入]JavaScript在ASP里的应用!
    [导入]禁用 FSO
    [导入]JScript到底算什么?
    [导入]远程ACCESS数据库的打开方法(转)
    [导入]Flash播放器
    [导入].NET常见问题集锦(1转)
    关于IDbConnectionFactory
  • 原文地址:https://www.cnblogs.com/fanshuyao/p/8655870.html
Copyright © 2020-2023  润新知