cloud-battery-manage/gateway-server/src/main/resources/application.yml
2025-04-16 14:11:18 +08:00

52 lines
2.0 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

security.token.public_key_base64: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA23qzsZ/51EA9PAYvGyGwlSYEZxnGmF3FxiraUvLyeiBawyGFCHprnmG+fr+80KmhGh1UMbNwuwIRgn8tEY9TjlfK7iNhsX1QGEjrL6LggDJeXlA/XN4kRPY9sW7+VQpr1MPJjB5tQYVkPLvv3L8v/7k5hcPEoHIFwQoOnYBuQqLkj38EQ/NlOQLKzhyDRFWSm+6WzQF46fTMRLzRpfuFhUBk9oF3B8Y/vAajY90QDw5xdV0uGreK6CgESldCzx6hh1AHiLLICINRKTNL1t+uhRaz/f0xm8baxaKzusv2relz69GADCQl/GrTArcfWXVXqvetFzsQOt35EBOpxl3nRwIDAQAB
# 1.server
server:
port: 9100
# 由于gateway中使用的 spring-boot-starter-webfulx 的依赖 和 spring-boot-starter-web依赖有所冲突
# 所以去掉了spring-boot-starter-web 此时项目的启动容器是Netty 所以我们在application.yml中
# 配置的server.servlet.context-path属性是没用的他的actuator监控地址仍是http://ip:port/actuator
# 可以自己添加WebFilter过滤器添加上这个
# servlet:
# context-path: /gateway
# 2.log
logging:
config: classpath:logback-spring.xml
level:
'[org.springframework.cloud.gateway]': info
# '[org.springframework.jdbc.core]': debug
# 3.spring
spring:
# 服务名称必须带上不然nacos服务列表中没有也不会有注册成功的信息
application:
name: gateway-server
# 设置转发数据包大小限制5M
codec:
max-in-memory-size: 10485760
config:
import:
- nacos:yt-common.properties?refreshEnabled=true
- nacos:${spring.application.name}.yaml?refreshEnabled=true
cloud:
nacos:
serverAddr: 192.168.5.213:8848
username: nacos
password: nacos
config:
namespace: ${nacos.namespace:public}
discovery:
namespace: ${nacos.namespace:public}
register-enabled: true
#server-addr: 10.10.1.6:8848
#ip: 10.10.1.2
# 5.为springbootadmin开启所有检查
management:
endpoints:
web:
exposure:
include: "*"
endpoint:
health:
show-details: always
# xml文件中配置的日志文件的名称
logfile:
external-file: /logs/gateway/gateway-server.log