1 Star 0 Fork 0

吴鹏飞/springcloud-config

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
config-provider-emp.yml 3.29 KB
一键复制 编辑 原始数据 按行查看 历史
吴鹏飞 提交于 2021-04-21 00:12 +08:00 . 提交application.yml文件
spring:
profiles:
active: dev
---
server:
port: 8001
spring:
profiles: dev
application:
name: springcloud-config-provider-emp # 多个均衡服务名称相同
datasource:
type: com.alibaba.druid.pool.DruidDataSource #当前数据源操作类型
driver-class-name: com.mysql.cj.jdbc.Driver #mysql驱动包
url: jdbc:mysql://127.0.0.1:3306/springcloud1?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC
# url: jdbc:mysql://127.0.0.1:3306/cloudDB01&serverTimezone=UTC #数据库连接
username: root
password: root
dbcp2:
min-idle: 5 #数据库连接池的最小维持连接数
initial-size: 5 #初始化连接数
max-total: 5 #最大连接数
max-wait-millis: 200 #等待连接获取的最大超时时间
mybatis:
type-aliases-package: api.entity
config-location: classpath:mybatis/mybatis-config.xml
mapper-locations: classpath:mybatis/mapper/*.xml #api实体类所在路径
eureka:
instance:
prefer-ip-address: true # 是否在eureka控制页面Status部分显示IP地址
instance-id: ${spring.cloud.client.ipAddress}:${server.port}
#不配置就是上面的springcloud-provider-emp
client:
service-url:
# defaultZone: http://localhost:7001/eureka/
defaultZone: http://eureka7001:7001/eureka/, http://eureka7002:7002/eureka/, http://eureka7003:7003/eureka/
info:
app.name: ${spring.application.name}
company.name: abc
---
server:
port: 8001
spring:
profiles: test
application:
name: springcloud-config-provider-emp # 多个均衡服务名称相同
datasource:
type: com.alibaba.druid.pool.DruidDataSource #当前数据源操作类型
driver-class-name: com.mysql.cj.jdbc.Driver #mysql驱动包
url: jdbc:mysql://127.0.0.1:3306/springcloud2?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC
# url: jdbc:mysql://127.0.0.1:3306/cloudDB01&serverTimezone=UTC #数据库连接
username: root
password: root
dbcp2:
min-idle: 5 #数据库连接池的最小维持连接数
initial-size: 5 #初始化连接数
max-total: 5 #最大连接数
max-wait-millis: 200 #等待连接获取的最大超时时间
mybatis:
type-aliases-package: api.entity
config-location: classpath:mybatis/mybatis-config.xml
mapper-locations: classpath:mybatis/mapper/*.xml #api实体类所在路径
eureka:
instance:
prefer-ip-address: true # 是否在eureka控制页面Status部分显示IP地址
instance-id: ${spring.cloud.client.ipAddress}:${server.port}
#不配置就是上面的springcloud-provider-emp
client:
service-url:
# defaultZone: http://localhost:7001/eureka/
defaultZone: http://eureka7001:7001/eureka/, http://eureka7002:7002/eureka/, http://eureka7003:7003/eureka/
info:
app.name: ${spring.application.name}
company.name: abc
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/wu-pengfei-1991/springcloud-config.git
[email protected]:wu-pengfei-1991/springcloud-config.git
wu-pengfei-1991
springcloud-config
springcloud-config
master

搜索帮助