请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

* What went wrong: Could not resolve all files for configuration

  • What went wrong:
    Could not resolve all files for configuration ‘:compileClasspath’.

Could not find org.thymeleaf:thymeleaf-spring5:3.0.3.RELEASE.
Required by:
project : > org.springframework.boot:spring-boot-starter-thymeleaf:2.1.0.RELEASE

正在回答 回答被采纳积分+3

3回答

老卫 2018-11-19 20:31:37

去掉 thymeleafVersion = '3.0.3.RELEASE' 

新版本的spring boot 本来就是用这个版本的 thymeleaf,所以无需自定义版本

0 回复 有任何疑惑可以回复我~
  • 提问者 15rjgcw #1
    老师,这个回答下面还有两个问题
    为什么需要在buildscript指定版本,以及thymeleaf的官方版本和spring里的版本有不同吗,我下面配置可行吗
    回复 有任何疑惑可以回复我~ 2018-11-19 21:32:51
提问者 15rjgcw 2018-11-19 20:04:48

老师,为什么需要在buildscript里配两个依赖,在dependencies里又配置一个依赖,为什么需要分两个地方,直接全都在dependencies里配置不好吗?

0 回复 有任何疑惑可以回复我~
  • 老卫 #1
    一个是插件运行要用,一个是应用运行要用。
    回复 有任何疑惑可以回复我~ 2018-11-20 12:56:22
提问者 15rjgcw 2018-11-19 20:03:14

最新的gradle按视频里配行不通啊,

buildscript {
	ext {
		springBootVersion = '2.1.0.RELEASE'
		thymeleafVersion = '3.0.3.RELEASE'
		thymeleafLayoutDialectVersion = '2.1.0'
	}
	repositories {
		//mavenCentral()
		maven { 
			url 'http://maven.aliyun.com/nexus/content/groups/public/'
		}
	}
	dependencies {
		classpath("org.thymeleaf:thymeleaf:${thymeleafVersion}")
		classpath("nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect:${thymeleafLayoutDialectVersion}")
		classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
	}
}

老师,你看我这么写行不行,我可以运行通过,不知道有没有影响

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号