1 Star 0 Fork 0

lpy / spring-cloud-config

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
spring-config-product.yml 2.82 KB
一键复制 编辑 原始数据 按行查看 历史
lpy 提交于 2021-07-14 13:18 . update spring-config-product.yml.
spring:
profiles:
active: dev # 激活开发环境配置
---
server:
port: 8001
mybatis:
config-location: classpath:mybatis/mybatis.cfg.xml # mybatis配置文件所在路径
type-aliases-package: cn.gson.springcloud.model.entity # 所有Entity别名类所在包
mapper-locations: classpath:mybatis/mapper/**/*.xml # mapper映射文件
spring:
profiles: dev # 开发环境
application:
name: microservice-product-config # ******服务名*******
datasource:
type: com.alibaba.druid.pool.DruidDataSource # 当前数据源操作类型
driver-class-name: com.mysql.jdbc.Driver # mysql驱动包
url: jdbc:mysql://localhost:3306/springcloud_db01?serverTimezone=GMT%2B8 #数据库连接地址,*****注意库名 db01***************
username: root
password: 123456
dbcp2:
min-idle: 5 # 数据库连接池的最小维持连接数
initial-size: 5 # 初始化连接数
max-total: 5 # 最大连接数
max-wait-millis: 150 # 等待连接获取的最大超时时间
eureka:
client:
registerWithEureka: true
fetchRegistry: true
serviceUrl:
defaultZone: http://eureka6001.com:6001/eureka
instance:
instanceId: ${spring.application.name}:${server.port}
prefer-ip-address: true
emp:
name: zhangsan-3
---
server:
port: 8001
mybatis:
config-location: classpath:mybatis/mybatis.cfg.xml # mybatis配置文件所在路径
type-aliases-package: cn.gson.springcloud.model.entity # 所有Entity别名类所在包
mapper-locations: classpath:mybatis/mapper/**/*.xml # mapper映射文件
spring:
profiles: prod # 生产环境
application:
name: microservice-product-config # ******服务名*******
datasource:
type: com.alibaba.druid.pool.DruidDataSource # 当前数据源操作类型
driver-class-name: com.mysql.jdbc.Driver # mysql驱动包
url: jdbc:mysql://localhost:3306/springcloud_db02?serverTimezone=GMT%2B8 #数据库连接地址,*****注意库名 db02***************
username: root
password: 123456
dbcp2:
min-idle: 5 # 数据库连接池的最小维持连接数
initial-size: 5 # 初始化连接数
max-total: 5 # 最大连接数
max-wait-millis: 150 # 等待连接获取的最大超时时间
eureka:
client:
registerWithEureka: true
fetchRegistry: true
serviceUrl:
defaultZone: http://eureka6001.com:6001/eureka
instance:
instanceId: ${spring.application.name}:${server.port}
prefer-ip-address: true
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
XML
1
https://gitee.com/lipeyi/spring-cloud-config.git
git@gitee.com:lipeyi/spring-cloud-config.git
lipeyi
spring-cloud-config
spring-cloud-config
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891