Explorar o código

:recycle: 重构代码。 fix #4 #5 #6

冷冷 %!s(int64=6) %!d(string=hai) anos
pai
achega
1b3201852e

+ 1 - 1
pigx-auth/src/main/resources/bootstrap.yml

@@ -3,7 +3,7 @@ server:
 
 spring:
   application:
-    name: pigx-auth
+    name: @artifactId@
   # 配置中心
   cloud:
     config:

+ 3 - 3
pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/constant/ServiceNameConstant.java

@@ -26,17 +26,17 @@ package com.pig4cloud.pigx.common.core.constant;
  */
 public interface ServiceNameConstant {
 	/**
-	 * 认证服务的SERVICEID(zuul 配置的对应)
+	 * 认证中心
 	 */
 	String AUTH_SERVICE = "pigx-auth";
 
 	/**
 	 * UMPS模块
 	 */
-	String UMPS_SERVICE = "pigx-upms";
+	String UMPS_SERVICE = "pigx-upms-biz";
 
 	/**
 	 * 分布式事务协调服务
 	 */
-	String  TX_MANAGER = "pigx-tx-manager";
+	String TX_MANAGER = "pigx-tx-manager";
 }

+ 1 - 3
pigx-common/pigx-common-core/src/main/resources/logback-spring.xml

@@ -51,9 +51,7 @@
 	</logger>
 
 	<!-- Level: FATAL 0  ERROR 3  WARN 4  INFO 6  DEBUG 7 -->
-	<root level="WARN">
+	<root level="INFO">
 		<appender-ref ref="console" />
-		<appender-ref ref="debug" />
-		<appender-ref ref="error" />
 	</root>
 </configuration>

+ 1 - 1
pigx-config/src/main/resources/bootstrap.yml

@@ -3,7 +3,7 @@ server:
 
 spring:
   application:
-    name: pigx-config
+    name: @artifactId@
   profiles:
     active: native
   # 配置中心

+ 0 - 6
pigx-config/src/main/resources/config/application-dev.yml

@@ -106,9 +106,3 @@ security:
     resource:
       loadBalanced: true
       token-info-uri: http://pigx-auth/oauth/check_token
-
-# log配置
-logging:
-  level:
-    root: error
-    com.pig4cloud.pigx: info

pigx-config/src/main/resources/config/pigx-upms-dev.yml → pigx-config/src/main/resources/config/pigx-upms-biz-dev.yml


+ 7 - 8
pigx-config/src/main/resources/logback-spring.xml

@@ -1,15 +1,16 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <configuration debug="false" scan="false">
 	<springProperty scop="context" name="spring.application.name" source="spring.application.name" defaultValue=""/>
-	<property name="log.path" value="logs/${spring.application.name}" />
+	<property name="log.path" value="logs/${spring.application.name}"/>
 	<!-- 彩色日志格式 -->
 	<property name="CONSOLE_LOG_PATTERN"
-			  value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}" />
+			  value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
 	<!-- 彩色日志依赖的渲染类 -->
-	<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" />
-	<conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" />
+	<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>
+	<conversionRule conversionWord="wex"
+					converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"/>
 	<conversionRule conversionWord="wEx"
-					converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" />
+					converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"/>
 	<!-- Console log output -->
 	<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
 		<encoder>
@@ -48,8 +49,6 @@
 
 	<!-- Level: FATAL 0  ERROR 3  WARN 4  INFO 6  DEBUG 7 -->
 	<root level="INFO">
-		<appender-ref ref="console" />
-		<appender-ref ref="debug" />
-		<appender-ref ref="error" />
+		<appender-ref ref="console"/>
 	</root>
 </configuration>

+ 2 - 2
pigx-eureka/src/main/resources/bootstrap.yml

@@ -7,7 +7,7 @@ spring:
       name: pig
       password: pig
   application:
-    name: pig-eureka
+    name: @artifactId@
   cloud:
     config:
       enabled: false
@@ -15,7 +15,7 @@ spring:
 # 类似的 redis 使用pigx-redis ,gateway 换成 pigx-gateway
 eureka:
   instance:
-    hostname: lengleng
+    hostname: pigx-eureka
     prefer-ip-address: true
   client:
     register-with-eureka: false

+ 0 - 3
pigx-eureka/src/main/resources/logback-spring.xml

@@ -46,10 +46,7 @@
 		</filter>
 	</appender>
 
-	<!-- Level: FATAL 0  ERROR 3  WARN 4  INFO 6  DEBUG 7 -->
 	<root level="INFO">
 		<appender-ref ref="console" />
-		<appender-ref ref="debug" />
-		<appender-ref ref="error" />
 	</root>
 </configuration>

+ 1 - 1
pigx-gateway/src/main/resources/bootstrap.yml

@@ -3,7 +3,7 @@ server:
 
 spring:
   application:
-    name: pigx-gateway
+    name: @artifactId@
   # 配置中心
   cloud:
     config:

+ 1 - 1
pigx-upms/pigx-upms-biz/src/main/resources/bootstrap.yml

@@ -3,7 +3,7 @@ server:
 
 spring:
   application:
-    name: pigx-upms
+    name: @artifactId@
   # dev环境
   profiles:
     active: dev

+ 1 - 1
pigx-visual/pigx-activiti/src/main/resources/bootstrap.yml

@@ -3,7 +3,7 @@ server:
 
 spring:
   application:
-    name: pigx-activiti
+    name: @artifactId@
   # 配置中心
   cloud:
     config:

+ 1 - 4
pigx-visual/pigx-codegen/src/main/resources/bootstrap.yml

@@ -3,7 +3,7 @@ server:
 
 spring:
   application:
-    name: pigx-codegen
+    name: @artifactId@
   #配置中心
   cloud:
     config:
@@ -21,6 +21,3 @@ eureka:
   client:
     service-url:
       defaultZone: http://pig:pig@pigx-eureka:1025/eureka/
-logging:
-  level:
-    root: info

+ 2 - 2
pigx-visual/pigx-daemon/src/main/resources/bootstrap.yml

@@ -1,9 +1,9 @@
 server:
-  port: 5001
+  port: 5003
 
 spring:
   application:
-    name: pigx-daemon
+    name: @artifactId@
   #配置中心
   cloud:
     config:

+ 1 - 1
pigx-visual/pigx-monitor/src/main/resources/bootstrap.yml

@@ -3,7 +3,7 @@ server:
 
 spring:
   application:
-    name: pigx-monitor
+    name: @artifactId@
   #配置中心
   cloud:
     config:

+ 1 - 3
pigx-visual/pigx-sso-client-demo/src/main/resources/bootstrap.yml

@@ -3,8 +3,6 @@ server:
   servlet:
     context-path: /sso1
 
-
-
 security:
   oauth2:
     client:
@@ -19,7 +17,7 @@ security:
 
 spring:
   application:
-    name: pig-sso-client-demo
+    name: @artifactId@
 # 注册中心
 eureka:
   instance:

+ 1 - 1
pigx-visual/pigx-tx-manager/src/main/resources/bootstrap.yml

@@ -3,7 +3,7 @@ server:
 
 spring:
   application:
-    name: pigx-tx-manager
+    name: @artifactId@
   #配置中心
   cloud:
     config: