错误, Failed to introspect annotated methods on class org.springframework.boot.web.servlet.support.SpringBootServletInitializer 谨记谨记,项目启动没成功,先看看你的springboot项目里面有没有jar包没导入好的,接了一个有modbus4j的,这个jar包非得手动导入,搞半天发现是jar没导入好
2.确实还有另一种情况:改成compile
compile:默认值,表示当前依赖包,要参与当前项目的编译,后续测试,运行时,打包
provided:代表在编译和测试的时候用,运行,打包的时候不会打包进去
test:表示当前依赖包只参与测试时的工作:比如Junit
runtime:表示当前依赖包只参与运行周期,其他跳过了
system:从参与度和provided一致,不过被依赖项不会从maven远程仓库下载,而是从本地的系统拿。需要systemPath属性来定义路径
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<!--<scope>provided</scope>-->
<scope>compile</scope>
</dependency>