加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
config-dept.yaml 2.34 KB
一键复制 编辑 原始数据 按行查看 历史
panliuquan 提交于 2024-08-25 00:28 . 8001and7001config
spring:
profiles:
active: dev
---
# 服务端口号
server:
port: 8001
#mybatis配置
mybatis:
# 配置别名包
type-aliases-package: com.itplq.springcloud.pojo
# 配置mapper.xml文件位置
mapper-locations: classpath:mybatis/mapper/*.xml
# mybatis配置
config-location: classpath:mybatis/mybatis-config.xml
#spring配置
spring:
profiles: dev
application:
name: springcloud-config-dept # 设置服务名称
# 配置数据库连接信息
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/springcloud?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
username: root
password: 123456
# 配置eureka服务注册到哪里
eureka:
client:
service-url:
defaultZone: http://eureka7001.com:7001/eureka/,http://eureka7002.com:7002/eureka/,http://eureka7003.com:7003/eureka/
instance:
instance-id: springcloud-provider-dept-8001 # 设置服务实例id
hostname: localhost # 设置主机名
# 导入actuator监控后,可以看到监控信息
info:
app.name: ITPLQ Spring Cloud
company.name: ITPLQ
---
# 服务端口号
server:
port: 8001
#mybatis配置
mybatis:
# 配置别名包
type-aliases-package: com.itplq.springcloud.pojo
# 配置mapper.xml文件位置
mapper-locations: classpath:mybatis/mapper/*.xml
# mybatis配置
config-location: classpath:mybatis/mybatis-config.xml
#spring配置
spring:
profiles: test
application:
name: springcloud-config-dept # 设置服务名称
# 配置数据库连接信息
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/springcloud2?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
username: root
password: 123456
# 配置eureka服务注册到哪里
eureka:
client:
service-url:
defaultZone: http://eureka7001.com:7001/eureka/,http://eureka7002.com:7002/eureka/,http://eureka7003.com:7003/eureka/
instance:
instance-id: springcloud-provider-dept-8001 # 设置服务实例id
hostname: localhost # 设置主机名
# 导入actuator监控后,可以看到监控信息
info:
app.name: ITPLQ Spring Cloud
company.name: ITPLQ
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化