gradle 中指定 spring boot 的 thymeleaf 的版本
2017-11-01 00:00
232 查看
实际上下面这两行
ext['thymeleaf.version'] = '3.0.2.RELEASE'
ext['thymeleaf-layout-dialect.version'] = '2.1.1'
build.gradle 配置如下:
ext['thymeleaf.version'] = '3.0.2.RELEASE'
ext['thymeleaf-layout-dialect.version'] = '2.1.1'
build.gradle 配置如下:
configurations { providedRuntime } /** 配置这两个属性使用新版的 thymeleaf 而不是默认的 2.1 官方说明(但未说明Gradle如何配置):http://docs.spring.io/spring-boot/docs/1.5.4.RELEASE/reference/htmlsingle/#howto-use-thymeleaf-3 Gradle 配置方式 参考:https://github.com/spring-projects/spring-boot/issues/4393 */ ext['thymeleaf.version'] = '3.0.2.RELEASE' ext['thymeleaf-layout-dialect.version'] = '2.1.1' ext['environment'] = System.getProperty("env", "dev")// 运行和打包的环境选择, 默认是开发环境 ,获取 gradle 参数中 -Dprofile 的值: gradle -Denv=production clean build dependencies { compile 'org.springframework.boot:spring-boot-devtools' compile('org.springframework.boot:spring-boot-starter-aop') compile('org.springframework.boot:spring-boot-starter-cache') //compile('org.springframework.boot:spring-boot-starter-jdbc') compile('org.springframework.boot:spring-boot-starter-data-jpa') compile('org.springframework.boot:spring-boot-starter-jersey') compile('org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.0') //compile('org.springframework.boot:spring-boot-starter-security') compile('org.springframework.boot:spring-boot-starter-thymeleaf') compile('org.springframework.boot:spring-boot-starter-web') compile('org.springframework.boot:spring-boot-starter-web-services') //compile('org.springframework.boot:spring-boot-starter-tomcat') compile('org.springframework.boot:spring-boot-starter-undertow') compile('mysql:mysql-connector-java') compile('com.alibaba:druid:1.0.25') compile('org.apache.commons:commons-lang3:3.4') compile('org.apache.poi:poi:3.9') compile('org.apache.poi:poi-ooxml:3.9') compile('org.bitbucket.b_c:jose4j:0.5.1') compile('org.apache.httpcomponents:httpclient:4.5.2') compile('org.apache.httpcomponents:httpmime') compile('com.belerweb:pinyin4j:2.5.0') compile('org.apache.axis2:axis2-kernel:1.7.4') compile('org.apache.axis2:axis2-adb:1.2') compile('net.sf.json-lib:json-lib:2.4:jdk15') compile('com.google.guava:guava:18.0') compile('com.thoughtworks.xstream:xstream:1.4.2') //compile('javax.persistence:persistence-api:1.0.2') //spring-shiro setting start compile('org.apache.shiro:shiro-core:1.2.2') compile('org.apache.shiro:shiro-spring:1.2.2') compile('org.apache.shiro:shiro-ehcache:1.2.2') //spring-shiro setting end compile fileTree(dir:'libs',include:'*.jar') //compile('org.springframework:springloaded:1.2.7.RELEASE') //providedRuntime('org.springframework.boot:spring-boot-starter-tomcat') //providedRuntime('org.springframework.boot:spring-boot-starter-undertow') //打war包设置 runtime('org.springframework.boot:spring-boot-starter-undertow') //打jar包需要设置为runtime testCompile('org.springframework.boot:spring-boot-starter-test') }
相关文章推荐
- 为什么Spring Boot项目引入依赖的时候可以不指定依赖的版本号
- SpringBoot+Dubbo+Mybatis 项目升级版本(Gradle)
- IDEA中springboot项目热部署(含maven版本和gradle版本)
- Spring Boot—— Thymeleaf (gradle) 的简单使用
- Spring Boot —— Thymeleaf + Gradle run on Tomcat(war形式)
- 初来乍道多多关照,用idea构建springboot+gradle+mybatis+thymeleaf项目
- 《Springboot极简教程》使用Spring Boot, JPA, Mysql, ThymeLeaf,gradle, Kotlin快速构建一个CRUD Web App
- SpringBoot项目推荐-Gradle版本
- Spring Boot + Gradle + Thymeleaf
- Spring Boot—— Thymeleaf (gradle) 的简单使用
- spring-boot整合Thymeleaf
- Intellij和SpringBoot,gradle构建Hello world!工程
- idea使用gradle搭建SpringBoot
- Springboot + gradle + websocket的简单使用
- 使用Gradle构建SpringBoot工程系列:第五篇:编写Spring Boot主类及第一次运行
- spring boot(四):thymeleaf使用详解
- 分享知识-快乐自己:springboot之thymeleaf (1):简单的thymeleaf例子
- 详解SpringBoot+Thymeleaf 基于HTML5的现代模板引擎
- Spring Boot 快速上手(八)集成Thymeleaf
- SpringBoot学习-(6)使用thymeleaf