解决黑马ssm框架视频springboot创建工程maven解析慢,没有java8问题,Could not transfer artifact org.springframework:spring-context:jar:5.3.23未解析等问题对标视频ssm框架教程
原因:由于上个视频配置私服导致maven本地配置出现的问题
解决:
-
首先找到maven本地设置

替换settings.xml里面的代码
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
| <?xml version="1.0" encoding="UTF-8"?> <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>F:/repo</localRepository>
<mirrors> <mirror> <id>nexus-aliyun</id> <name>Nexus aliyun</name> <url>http://maven.aliyun.com/nexus/content/groups/public</url> <mirrorOf>central</mirrorOf> </mirror>
<mirror> <id>maven-public</id> <mirrorOf>*</mirrorOf> <url>http://localhost:8081/repository/maven-public/</url> </mirror>
</mirrors>
<servers> <server> <id>itheima-release</id> <username>admin</username> <password>admin</password> </server> <server> <id>itheima-snapshot</id> <username>admin</username> <password>admin</password> </server> </servers>
<profiles> <profile> <id>default</id> <repositories> <repository> <id>central</id> <url>https://repo.maven.apache.org/maven2</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> </repositories> </profile> </profiles>
<activeProfiles> <activeProfile>default</activeProfile> </activeProfiles>
</settings>
|
将代码复制进去
- 来到IDEA新建项目

将 start.spring.org 改成 start.ailiyun.com 这边采用阿里云的解决没有java8,由于官方不维护springboot2.x导致java8不能用了,还好阿里云还提供springboot2.x的版本。然后springboot的版本随便选一个就行了,本人这边采用2.6.13的版本

然后我们刷新一下maven会报这种错误

这时候打开idea设置

将捆绑的maven3改成本地的maven使用路径


最后确定一下刷新一下maven就好了
解决黑马ssm框架视频springboot创建工程maven解析慢,没有java8问题