1 Star 0 Fork 0

正则吃饺子/springcloud-config-study

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
config-provider.yml 2.49 KB
一键复制 编辑 原始数据 按行查看 历史
正则吃饺子 提交于 2022-01-07 15:00 . 配置文件;
spring:
profiles:
active: dev
---
############开发环境
server:
port: 8082
servlet:
context-path: /springcloud-provider
##mybatis配置
mybatis:
type-aliases-package: com.yuanbao.springcloud.bean
mapper-locations: classpath:mybatis/mapper/*.xml
config-location: classpath:mybatis/mybatis-config.xml
##项目名称
spring:
profiles: dev
application:
name: springcloud-provider-8082
##数据库
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/my_springcloud_01?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true
username: root
password: 6yhn9ij^
### 配置eureka,服务注册地址
eureka:
client:
service-url:
# defaultZone: http://localhost:7001/eureka/ # 单机版测试
defaultZone: http://eureka7001.com:7001/eureka/,http://eureka7002.com:7002/eureka/,http://eureka7003.com:7003/eureka/ # 模拟集群测试
instance:
instance-id: springcloud-provider-dept8082-new # ###### 修改其在eureka上的展示信息
prefer-ip-address: true
#info信息配置
info:
app.name: yuanbao-springcloud
company.name: yuanbaokeji
my:
application:
info: "这是dev环境的provider"
---
############测试环境环境
server:
port: 8082
servlet:
context-path: /springcloud-provider
##mybatis配置
mybatis:
type-aliases-package: com.yuanbao.springcloud.bean
mapper-locations: classpath:mybatis/mapper/*.xml
config-location: classpath:mybatis/mybatis-config.xml
##项目名称
spring:
profiles: test
application:
name: springcloud-provider-8082
##数据库
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/my_springcloud_01?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true
username: root
password: 6yhn9ij^
### 配置eureka,服务注册地址
eureka:
client:
service-url:
# defaultZone: http://localhost:7001/eureka/ # 单机版测试
defaultZone: http://eureka7001.com:7001/eureka/,http://eureka7002.com:7002/eureka/,http://eureka7003.com:7003/eureka/ # 模拟集群测试
instance:
instance-id: springcloud-provider-dept8082-new # ###### 修改其在eureka上的展示信息
prefer-ip-address: true
#info信息配置
info:
app.name: yuanbao-springcloud
company.name: yuanbaokeji
my:
application:
info: "这是test环境的provider"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/slovem619/springcloud-config-study.git
git@gitee.com:slovem619/springcloud-config-study.git
slovem619
springcloud-config-study
springcloud-config-study
master

搜索帮助