编写application.yml文件
server:
port: 5001
spring:
application:
name: config-server
profiles:
active: jdbc
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/ordertest?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: root
password: root
pom文件
<!--连接数据库相关的jar包-->
<dependency>
<groupId>org.springframework