server: port: 8080 spring: application: name: spring-department datasource: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://127.0.0.1:3306/purchase?useUnicode=true&characterEncoding=utf-8&serverTimezone=UTC username: root password: 123456 redis: host: 127.0.0.1 port: 6369 database: 0 mybatis: mapper-locations: classpath:mapper/*Mapper.xml eureka: client: service-url: defaultZone: http://127.0.0.1:9000/eureka instance: prefer-ip-address: true #客户端在注册时使用自己的IP而不是主机名 instance-id: ${spring.cloud.client.ip-address}:${spring.application.name}:${server.port} #实例id
时间: 2023-05-25 16:06:03 浏览: 191
SpringBoot多数据源配置(方式五:使用dynamic-datasource动态数据源插件).docx
这是一个包含了服务器的端口号为8080和Spring应用程序的配置文件。应用程序的名称为spring-department,它使用MySQL数据库的驱动程序为com.mysql.cj.jdbc.Driver,连接的URL为jdbc:mysql://127.0.0.1:3306/purchase?useUnicode=true。
阅读全文