diff --git a/pom.xml b/pom.xml index bb65ff0..9d4919c 100644 --- a/pom.xml +++ b/pom.xml @@ -79,20 +79,6 @@ - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - - - repackage - - - - - org.apache.maven.plugins diff --git a/xs-server/pom.xml b/xs-server/pom.xml index e35887e..8641f71 100644 --- a/xs-server/pom.xml +++ b/xs-server/pom.xml @@ -34,7 +34,7 @@ exec - com.xiang.AuthApplication + com.xiang.XsGatewayApplication ZIP diff --git a/xs-server/src/main/resources/application-test.yml b/xs-server/src/main/resources/application-test.yml new file mode 100644 index 0000000..1d65a9d --- /dev/null +++ b/xs-server/src/main/resources/application-test.yml @@ -0,0 +1,40 @@ +server: + port: 38010 + +spring: + application: + name: xservice-gateway + main: + web-application-type: reactive # 强制使用 WebFlux + cloud: + nacos: + discovery: + server-addr: general.xiangtech.xyz:8848 + namespace: e4a9b94d-637e-4faf-8521-6ffc090a8c03 + group: DEFAULT_GROUP + username: nacos + password: nacos + gateway: + discovery: + locator: + enabled: true # 开启 nacos 自动路由 + routes: + - id: xservice-auth-center + uri: lb://xservice-auth-center + predicates: + - Path=/api-auth/** + filters: + - StripPrefix=1 + + redis: + host: r-bp1wt59a6nfyt4e3ltpd.redis.rds.aliyuncs.com + port: 6379 + password: Xiang0000 # 如果无密码可以省略 + database: 0 + timeout: 5000 + lettuce: + pool: + max-active: 8 + max-idle: 8 + min-idle: 0 + max-wait: 1000 \ No newline at end of file diff --git a/xs-server/src/main/resources/logback-spring.xml b/xs-server/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..f9787e5 --- /dev/null +++ b/xs-server/src/main/resources/logback-spring.xml @@ -0,0 +1,102 @@ + + + + + + ${APP_NAME} + + + + + + + + + + + + + + %boldGreen(%contextName): %boldCyan(%d{yyyy-MM-dd HH:mm:ss:SSS}) %highlight([%c]) %boldMagenta([%t]) %boldCyan([%L]) %highlight([traceId:%X{traceId:-},spanId:%X{spanId:-},localIp:%X{localIp:-}]) %boldGreen([%p]) - %msg%n + + + UTF-8 + + + + + + + + ${LOG_HOME}/debug-%d{yyyy-MM-dd}.log + + ${LOG_MAX_HISTORY} + + + + %contextName: %d{yyyy-MM-dd HH:mm:ss.SSS} [%c][%t][%L][%p] [traceId:%X{traceId:-},spanId:%X{spanId:-},localIp:%X{localIp:-}] - %msg%n + UTF-8 + + + + debug + ACCEPT + DENY + + + + + + + + ${LOG_HOME}/info-%d{yyyy-MM-dd}.log + + ${LOG_MAX_HISTORY} + + + + %contextName: %d{yyyy-MM-dd HH:mm:ss.SSS} [%c][%t][%L][%p] [traceId:%X{traceId:-},spanId:%X{spanId:-},localIp:%X{localIp:-}] - %msg%n + UTF-8 + + + + + info + ACCEPT + DENY + + + + + + + + ${LOG_HOME}/error-%d{yyyy-MM-dd}.log + + ${LOG_MAX_HISTORY} + + + + %contextName: %d{yyyy-MM-dd HH:mm:ss.SSS} [%c][%t][%L][%p] [traceId:%X{traceId:-},spanId:%X{spanId:-},localIp:%X{localIp:-}] - %msg%n + UTF-8 + + + + error + ACCEPT + DENY + + + + + + + + + + + + + + + \ No newline at end of file