新建springBoot项目时报错或者失败
创建springboot项目时由于网络问题,可以将https://start.spring.io/更换为:
http://start.spring.io/ http不需要验证证书
http://start.aliyun.com/ 阿里云的springboot地址不会出现网络问题
如果生成springboot项目时报错了,即使是看起来微小的错误也会导致后面严重的问题无法解决,这个项目一定不要使用
使用阿里云地址生成的springBoot项目似乎会产生不确定的问题
另外:SpringBoot项目打jar包部署的时候遇到一个问题,xxx.jar包中没有主清单属性
网上很多手动修改web-inf下的mf文件的方式并不能根本解决问题,其实是少了maven的插件配置,完整的pom文件如下:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.0</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
浙公网安备 33010602011771号