美文网首页工作生活
Web Starter 作为传递依赖

Web Starter 作为传递依赖

作者: Quillagua | 来源:发表于2019-07-09 08:30 被阅读0次

Web Starter 作为传递依赖
问题:
工程用的模板是thymeleaf,启动报错提示找不到spring-boot-starter-web
原因:
以前有几个 Spring Boot starter 是依赖于 Spring MVC 而传递的spring-boot-starter-web。在 Spring WebFlux 新的支持下,spring-boot-starter-mustache,spring-boot-starter-freemarker并spring-boot-starter-thymeleaf不再依赖它。开发者有责任选择和添加spring-boot-starter-web或spring-boot-starter-webflux。
解决方案:
导入spring-boot-starter-web既可

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

相关文章

网友评论

    本文标题:Web Starter 作为传递依赖

    本文链接:https://www.haomeiwen.com/subject/iierhctx.html