如何解决Spring Boot 2.4.5和Java 11的模块系统问题
在我上面的例子中,我在类路径上有 spring.boot.starter.web 并且应用程序无法启动。如果我添加 org.apache.tomcat.embed.core 则应用程序成功启动。
当我这样配置module-info.java时
WARNING: Ignoring invalid distribution -jango (c:\users\myusername\appdata\roaming\python\python37\site-packages)
我的猜测是 Tomcat 没有启动
或
requires spring.boot;
requires spring.boot.autoconfigure;
requires spring.web;
requires spring.boot.starter.web;
2021-05-20 10:56:09.501 INFO 17112 --- [ main] com.example.police.PoliceApplication : Starting PoliceApplication using Java 11 on zhaozhiguang-pc with PID 17112 (D:\item\police\target\classes started by zhaozhiguang in D:\item\police)
2021-05-20 10:56:09.501 INFO 17112 --- [ main] com.example.police.PoliceApplication : No active profile set,falling back to default profiles: default
2021-05-20 10:56:10.565 INFO 17112 --- [ main] com.example.police.PoliceApplication : Started PoliceApplication in 1.435 seconds (JVM running for 3.153)
Process finished with exit code 0
这个成功了
requires spring.boot;
requires spring.boot.autoconfigure;
requires spring.web;
requires org.apache.tomcat.embed.core;
为什么?
spring.boot.starter.web 依赖于 org.apache.tomcat.embed.core 吗?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。