<repositories> <repository> <id>nexus-aliyun</id> <name>nexus-aliyun</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository>
</repositories> <pluginRepositories> <pluginRepository> <id>public</id> <name>aliyun nexus</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </pluginRepository> </pluginRepositories>
将上面代码放到pom.xml文件中的最后面
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.url=jdbc:mysql://localhost:3306/mysql_1?serverTimezone=GMT%2b8 spring.datasource.username=root spring.datasource.password=yuan0206
上面是application.properties文件中的配置,需要注意的地方为 :数据库本地端口号(一般默认都是3306),数据库连接名称,数据库账号密码
标签:配置,Springboot,nexus,spring,端的,datasource,aliyun,mysql,public From: https://www.cnblogs.com/Yuansj0206/p/17663681.html