加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
config-provider.yml 2.44 KB
一键复制 编辑 原始数据 按行查看 历史
SpunkySnail 提交于 2024-09-13 08:36 . update config-provider.yml.
spring:
profiles:
active: dev
---
# spring配置
spring:
profiles: dev
application:
name: springcloud-config-provider-dev
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost:3306/springcloud?characterEncoding=UTF-8&useSSL=false
username: root
password: root
mybatis:
type-aliases-package: com.kuang.pojo
config-location: classpath:mybatis/mybatis-config.xml
mapper-locations: classpath:mybatis/mapper/*.xml
# Eureka配置:配置服务注册中心地址
eureka:
client:
# 表示将自己注册进Eureka Server默认为true
register-with-eureka: true
# 是否从Eureka Server抓去已有的注册信息,默认是true
fetch-registry: true
service-url:
# 注册中心地址7001-7003
defaultZone: http://eureka.com:7001/eureka/,http://eureka.two.com:7002/eureka/,http://eureka.three.com:7003/eureka/
instance:
instance-id: springcloud-provider-8001 #实例名称
prefer-ip-address: true #改为true后默认显示的是ip地址而不再是localhost
# info配置
info:
# 项目的名称
app.name: haust-springcloud-8001
# 公司的名称
company.name: 河南科技大学西苑校区软件学院
---
# spring配置
spring:
profiles: test
application:
name: springcloud-config-provider-test
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost:3306/springcloud02?characterEncoding=UTF-8&useSSL=false
username: root
password: root
mybatis:
type-aliases-package: com.kuang.pojo
config-location: classpath:mybatis/mybatis-config.xml
mapper-locations: classpath:mybatis/mapper/*.xml
# Eureka配置:配置服务注册中心地址
eureka:
client:
# 表示将自己注册进Eureka Server默认为true
register-with-eureka: true
# 是否从Eureka Server抓去已有的注册信息,默认是true
fetch-registry: true
service-url:
# 注册中心地址7001-7003
defaultZone: http://eureka.com:7001/eureka/,http://eureka.two.com:7002/eureka/,http://eureka.three.com:7003/eureka/
instance:
instance-id: springcloud-provider-8001 #实例名称
prefer-ip-address: true #改为true后默认显示的是ip地址而不再是localhost
# info配置
info:
# 项目的名称
app.name: haust-springcloud-8001
# 公司的名称
company.name: 河南科技大学西苑校区软件学院
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化