【thymeleaf版本】Failure to find org.thymeleaf:thymeleaf-spring5:jar:2 .1.1.RELEASE

背景

搭建springboot多模块时,打包时报如下错误

[ERROR] Failed to execute goal on project portal: Could not resolve dependencies for project per.haha:portal:jar:0.0.1-SNAPSHOT:
 Failure to find org.thymeleaf:thymeleaf-spring5:jar:2
.1.1.RELEASE in http://maven.aliyun.com/nexus/content/groups/public/ was cached in the local repository, resolution will not be  
reattempted until the update interval of alimaven has elapsed or updates are forced -> [Help 1]

解决

pom.xml中properties标签内的thymeleaf标签名问题

  <thymeleaf.version>2.1.1.RELEASE</thymeleaf.version>
  
  ...
  
   <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-thymeleaf</artifactId>
        <version>${springboot-thymeleaf.version}</version>
   </dependency>

改成

<springboot-thymeleaf.version>2.1.1.RELEASE</springboot-thymeleaf.version>

原因

这里用的是org.springframework.boot下的spring-boot-starter-thymeleaf,使用<thymeleaf.version>做标签时可能与org.thymeleaf有冲突,导致包获取不正确

  • 18
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 11
    评论
评论 11
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值