03_javaweb基础_《springboot项目踩坑记录01》

遇到的坑:

1.pdf复制过来的会自带空格,但是idea发现不了,会报错。
解决办法:删除重新打

2.maven配置的plugins的包下面报红线
002plugin配置出错信息.png
解决办法:
https://www.cnblogs.com/best-lwj/articles/9221309.html

删除所有以lastUpdated结尾的文件
重新点击reimport即可

3.pdf的配置直接粘贴到pom文件和xml文件,然后昨天pom文件报错,今天xml文件报错
我错了 低级问题联系两个坑 估计这辈子都忘不了了emmmm

4.Maven run 的时候错误
Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.0.6.RELEASE:repackage (default) on project spring-boot-01-hello: Execution default of goal org.springframework.boot:spring-boot-maven-plugin:2.0.6.RELEASE:repackage failed: Plugin org.springframework.boot:spring-boot-maven-plugin:2.0.6.RELEASE or one of its dependencies could not be resolved: Failed to collect dependencies at org.springframework.boot:spring-boot-maven-plugin:jar:2.0.6.RELEASE -> org.apache.maven:maven-archiver:jar:2.6 -> org.codehaus.plexus:plexus-archiver:jar:2.8.1: Failed to read artifact descriptor for org.codehaus.plexus:plexus-archiver:jar:2.8.1: Could not transfer artifact org.codehaus.plexus:plexus-components:pom:1.3 from/to alimaven (http://maven.aliyun.com/nexus/content/groups/public/): maven.aliyun.com: Unknown host maven.aliyun.com -> [Help 1]
[ERROR]

莫名其妙好了,可能是因为加了依赖:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
 <properties>
<start-class>
com.mengxuegu.springboot.HelloMainApplication
</start-class>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<project.reporting.outputEncoding>
UTF-8
</project.reporting.outputEncoding>
<java.version>
1.8
</java.version>
</properties>