1、环境:
- 操作系统:win10 64 位
- 数据库:mysql 5.5.62
- IDEA:2019.2
- java:jdk1.8
- maven:3.6.1,构建本地仓库,添加阿里镜像(国内下载速度快),settings.xml如下:
<?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>G:\apache-maven-3.6.1\repository</localRepository>
<pluginGroups>
</pluginGroups>
<proxies>
</proxies>
<servers>
</servers>
<mirrors>
<mirror>
<id>nexus-aliyun</id>
<name>nexus-aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
<profiles>
</profiles>
</settings>
2、新建springboot项目
建完工程,把application.properties 重命名为application.yml
建立完成后,pom.xml 内容如下:
<?xml vers