由于我想利用浏览器的地址栏传参,结果发现tomcat根本就没启动,排除很多因素之后,最后定位在pom文件里缺少依赖:

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

所以添加了依赖,结果发现缺少版本号,通过maven的本地仓库找到了对应的版本如下:

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

之后force update项目后恢复了正常,内置的tomcat就可以启动了。

重新运行的时候也出现了如下的提示:

SpringBoot项目点击运行tomcat无法启动的原因

 

就这样吧,找到答案的过程很曲折,但是通过思考也收获了很多额外的知识>>>

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-28
  • 2022-12-23
  • 2021-10-09
  • 2021-06-10
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-16
  • 2021-11-10
  • 2021-08-07
  • 2021-09-03
  • 2021-09-25
  • 2022-12-23
  • 2021-12-15
相关资源
相似解决方案