maven项目指定数据源
springboot项目
直接在pom.xml文件中添加以下配置
<!--使用阿里云maven中央仓库-->
<repositories><repository><id>aliyun-repos</id><url>http://maven.aliyun.com/nexus/content/groups/public/</url><snapshots><enabled>false</enabled></snapshots></repository>
</repositories><pluginRepositories><pluginRepository><id>aliyun-plugin</id><url>http://maven.aliyun.com/nexus/content/groups/public/</url><snapshots><enabled>false</enabled></snapshots></pluginRepository>
</pluginRepositories>
普通maven项目
在C:\user\当前用户.m2目录的setting.xml文件中的 标签中添加代码:
<mirror><id>alimaven</id><mirrorOf>central</mirrorOf><name>aliyun maven</name><url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</mirror>