代码拉取完成,页面将自动刷新
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"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。