Spring Boot学习笔记

YuDou dreaming...
  • Maven远程仓库默认为Maven Central Repository,可以在/conf/settings.xml中配置远程镜像仓库为国内阿里云镜像仓库,提高Jar包下载的速度和稳定性。配置settings.xml完成后保存退出。
1
2
3
4
5
6
7
8
# 在settings.xml 160行处添加镜像源,需要保证镜像源标签在mirror的第一个

<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>https://maven.aliyun.com/repository/public</url>
<mirrorOf>central</mirrorOf>
</mirror>

image-20241116005159364像这样,镜像源得在前,否则会报错

  • IntelliJ IDEA中项目代码若出现无法解析符号“xxx”报错且鼠标指针移到报错的符号(被高亮为红色)上没有提示”导入类’xxx‘时“,可以尝试点击右侧”更多操作“

更多操作

点击“添加Maven依赖项”

添加Maven依赖项

再选择合适的版本

选择合适版本

最后再导入类,即可解决报错

  • Title: Spring Boot学习笔记
  • Author: YuDou
  • Created at : 2024-11-16 00:04:31
  • Updated at : 2025-01-13 00:09:53
  • Link: https://sweetyudou.github.io/2024/11/16/Maven/
  • License: All Rights Reserved © YuDou
On this page
Spring Boot学习笔记