chore(config): Add Nacos initialization deployment support

This commit is contained in:
2025-04-14 15:31:17 +08:00
parent d2c4394516
commit 7c9513cf1e
9 changed files with 257 additions and 0 deletions
@@ -0,0 +1,17 @@
spring:
application:
name: video-gateway
cloud:
nacos:
discovery:
server-addr: ${NACOS_HOST:nacos}:${NACOS_PORT:8848}
namespace: public
group: DEFAULT_GROUP
# 确保服务能够被发现
ephemeral: true # 临时实例,适合容器环境
# 设置正确的注册IP
ip: ${GATEWAY_IP:}
port: ${server.port:9000}
# 增加重试次数
fail-fast: true
register-enabled: true
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>
<root level="INFO">
<appender-ref ref="CONSOLE"/>
</root>
<!-- 将DEBUG日志级别改为INFO,减少日志输出 -->
<logger name="com.alibaba.nacos.client.naming" level="INFO"/>
<logger name="org.springframework.cloud.gateway" level="INFO"/>
<logger name="org.springframework.cloud.loadbalancer" level="INFO"/>
</configuration>