浏览代码

Merge branch 'dev'

lishangbu 7 年之前
父节点
当前提交
7768a85ab5
共有 41 个文件被更改,包括 323 次插入292 次删除
  1. 2 2
      .gitignore
  2. 0 19
      pigx-auth/pom.xml
  3. 2 1
      pigx-auth/src/main/java/com/pig4cloud/pigx/auth/endpoint/PigxTokenEndpoint.java
  4. 1 1
      pigx-common/pigx-common-core/pom.xml
  5. 4 28
      pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/constant/CommonConstant.java
  6. 2 0
      pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/datascope/DataScope.java
  7. 55 0
      pigx-common/pigx-common-core/src/main/resources/logback-spring.xml
  8. 1 1
      pigx-common/pigx-common-job/pom.xml
  9. 1 1
      pigx-common/pigx-common-log/pom.xml
  10. 1 1
      pigx-common/pigx-common-log/src/main/resources/META-INF/spring-devtools.properties
  11. 1 1
      pigx-common/pigx-common-security/pom.xml
  12. 4 0
      pigx-common/pigx-common-security/src/main/java/com/pig4cloud/pigx/common/security/feign/PigxFeignClientInterceptor.java
  13. 3 4
      pigx-common/pigx-common-security/src/main/java/com/pig4cloud/pigx/common/security/service/PigxUserDetailsServiceImpl.java
  14. 1 1
      pigx-common/pigx-common-swagger/pom.xml
  15. 8 5
      pigx-common/pigx-common-swagger/src/main/java/com/pig4cloud/pigx/common/swagger/config/SwaggerAutoConfiguration.java
  16. 1 1
      pigx-common/pigx-common-transaction/pom.xml
  17. 1 1
      pigx-common/pom.xml
  18. 0 19
      pigx-config/pom.xml
  19. 13 16
      pigx-config/src/main/resources/config/application-dev.yml
  20. 55 0
      pigx-config/src/main/resources/logback-spring.xml
  21. 0 19
      pigx-eureka/pom.xml
  22. 55 0
      pigx-eureka/src/main/resources/logback-spring.xml
  23. 1 19
      pigx-gateway/pom.xml
  24. 1 1
      pigx-upms/pigx-upms-api/pom.xml
  25. 0 25
      pigx-upms/pigx-upms-biz/pom.xml
  26. 0 1
      pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/controller/DictController.java
  27. 0 2
      pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/controller/LogController.java
  28. 0 1
      pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/controller/RoleController.java
  29. 0 7
      pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/mapper/SysDeptMapper.java
  30. 12 0
      pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/mapper/SysDeptRelationMapper.java
  31. 6 5
      pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/service/impl/SysDeptServiceImpl.java
  32. 0 19
      pigx-upms/pigx-upms-biz/src/main/resources/mapper/SysDeptMapper.xml
  33. 37 0
      pigx-upms/pigx-upms-biz/src/main/resources/mapper/SysDeptRelationMapper.xml
  34. 1 1
      pigx-upms/pom.xml
  35. 1 19
      pigx-visual/pigx-codegen/pom.xml
  36. 6 5
      pigx-visual/pigx-codegen/src/main/java/com/pig4cloud/pigx/codegen/util/GenUtils.java
  37. 1 19
      pigx-visual/pigx-daemon/pom.xml
  38. 0 19
      pigx-visual/pigx-monitor/pom.xml
  39. 0 4
      pigx-visual/pigx-tx-manager/pom.xml
  40. 0 1
      pigx-visual/pom.xml
  41. 46 23
      pom.xml

+ 2 - 2
.gitignore

@@ -37,10 +37,10 @@ target/
 *.tar.gz
 
 ### logs ####
-logs
+/logs/
+*.log
 
 ### temp ignore ###
-*.log
 *.cache
 *.diff
 *.patch

+ 0 - 19
pigx-auth/pom.xml

@@ -30,7 +30,6 @@
 	<artifactId>pigx-auth</artifactId>
 	<packaging>jar</packaging>
 
-	<name>pigx-auth</name>
 	<description>pigx 认证授权中心,基于 spring security oAuth2</description>
 
 	<dependencies>
@@ -101,28 +100,10 @@
 			<plugin>
 				<groupId>org.springframework.boot</groupId>
 				<artifactId>spring-boot-maven-plugin</artifactId>
-				<configuration>
-					<finalName>${project.name}</finalName>
-				</configuration>
 			</plugin>
 			<plugin>
 				<groupId>com.spotify</groupId>
 				<artifactId>docker-maven-plugin</artifactId>
-				<version>0.4.12</version>
-				<configuration>
-					<imageName>${registry.url}/${project.name}:0.0.1</imageName>
-					<dockerHost>${docker.url}</dockerHost>
-					<dockerDirectory>${project.basedir}</dockerDirectory>
-					<resources>
-						<resource>
-							<targetPath>/</targetPath>
-							<directory>${project.build.directory}</directory>
-							<include>${project.build.finalName}.jar</include>
-						</resource>
-					</resources>
-					<serverId>docker-hub</serverId>
-					<registryUrl>https://index.docker.io/v1/</registryUrl>
-				</configuration>
 			</plugin>
 		</plugins>
 	</build>

+ 2 - 1
pigx-auth/src/main/java/com/pig4cloud/pigx/auth/endpoint/PigxTokenEndpoint.java

@@ -22,6 +22,7 @@ package com.pig4cloud.pigx.auth.endpoint;
 import cn.hutool.core.map.MapUtil;
 import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.plugins.Page;
+import com.pig4cloud.pigx.common.core.constant.SecurityConstants;
 import com.pig4cloud.pigx.common.core.util.R;
 import com.pig4cloud.pigx.common.security.service.PigxUser;
 import lombok.AllArgsConstructor;
@@ -53,7 +54,7 @@ import java.util.Map;
 @AllArgsConstructor
 @RequestMapping("/oauth")
 public class PigxTokenEndpoint {
-	private static final String PIGX_OAUTH_ACCESS = "pigx_oauth:access:";
+	private static final String PIGX_OAUTH_ACCESS = SecurityConstants.PIGX_PREFIX + SecurityConstants.OAUTH_PREFIX + "access:";
 	private final TokenStore tokenStore;
 	private final RedisTemplate redisTemplate;
 

+ 1 - 1
pigx-common/pigx-common-core/pom.xml

@@ -29,7 +29,7 @@
 
 	<artifactId>pigx-common-core</artifactId>
 	<packaging>jar</packaging>
-	<name>pigx-common-core</name>
+
 	<description>pigx 公共工具类核心包</description>
 
 

+ 4 - 28
pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/constant/CommonConstant.java

@@ -24,20 +24,6 @@ package com.pig4cloud.pigx.common.core.constant;
  * @date 2017/10/29
  */
 public interface CommonConstant {
-	/**
-	 * token请求头名称
-	 */
-	String REQ_HEADER = "Authorization";
-
-	/**
-	 * token分割符
-	 */
-	String TOKEN_SPLIT = "Bearer ";
-
-	/**
-	 * jwt签名
-	 */
-	String SIGN_KEY = "PIG";
 	/**
 	 * 删除
 	 */
@@ -57,16 +43,6 @@ public interface CommonConstant {
 	 */
 	String MENU = "0";
 
-	/**
-	 * 按钮
-	 */
-	String BUTTON = "1";
-
-	/**
-	 * 删除标记
-	 */
-	String DEL_FLAG = "del_flag";
-
 	/**
 	 * 编码
 	 */
@@ -78,12 +54,12 @@ public interface CommonConstant {
 	String CONTENT_TYPE = "application/json; charset=utf-8";
 
 	/**
-	 * 阿里大鱼
+	 * 前端工程名
 	 */
-	String ALIYUN_SMS = "aliyun_sms";
+	String FRONT_END_PROJECT = "pigx-ui";
 
 	/**
-	 * 路由信息Redis保存的key
+	 * 后端工程名
 	 */
-	String ROUTE_KEY = "_ROUTE_KEY";
+	String BACK_END_PROJECT = "pigx";
 }

+ 2 - 0
pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/datascope/DataScope.java

@@ -18,6 +18,7 @@
 package com.pig4cloud.pigx.common.core.datascope;
 
 import lombok.Data;
+import lombok.EqualsAndHashCode;
 
 import java.util.HashMap;
 import java.util.List;
@@ -28,6 +29,7 @@ import java.util.List;
  * 数据权限查询参数
  */
 @Data
+@EqualsAndHashCode(callSuper = true)
 public class DataScope extends HashMap {
 	/**
 	 * 限制范围的字段名称

+ 55 - 0
pigx-common/pigx-common-core/src/main/resources/logback-spring.xml

@@ -0,0 +1,55 @@
+<?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="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}}" />
+	<!-- 彩色日志依赖的渲染类 -->
+	<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" />
+	<!-- Console log output -->
+	<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+		<encoder>
+			<pattern>${CONSOLE_LOG_PATTERN}</pattern>
+		</encoder>
+	</appender>
+
+	<!-- Log file debug output -->
+	<appender name="debug" class="ch.qos.logback.core.rolling.RollingFileAppender">
+		<file>${log.path}/debug.log</file>
+		<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+			<fileNamePattern>${log.path}/%d{yyyy-MM}/debug.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
+			<maxFileSize>50MB</maxFileSize>
+			<maxHistory>30</maxHistory>
+		</rollingPolicy>
+		<encoder>
+			<pattern>%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n</pattern>
+		</encoder>
+	</appender>
+
+	<!-- Log file error output -->
+	<appender name="error" class="ch.qos.logback.core.rolling.RollingFileAppender">
+		<file>${log.path}/error.log</file>
+		<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+			<fileNamePattern>${log.path}/%d{yyyy-MM}/error.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
+			<maxFileSize>50MB</maxFileSize>
+			<maxHistory>30</maxHistory>
+		</rollingPolicy>
+		<encoder>
+			<pattern>%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n</pattern>
+		</encoder>
+		<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+			<level>ERROR</level>
+		</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-common/pigx-common-job/pom.xml

@@ -29,7 +29,7 @@
 
 	<artifactId>pigx-common-job</artifactId>
 	<packaging>jar</packaging>
-	<name>pigx-common-job</name>
+
 	<description>pigx 定时任务</description>
 
 	<dependencies>

+ 1 - 1
pigx-common/pigx-common-log/pom.xml

@@ -29,7 +29,7 @@
 
 	<artifactId>pigx-common-log</artifactId>
 	<packaging>jar</packaging>
-	<name>pigx-common-log</name>
+
 	<description>pigx 日志服务</description>
 
 

+ 1 - 1
pigx-common/pigx-common-log/src/main/resources/META-INF/spring-devtools.properties

@@ -1 +1 @@
-restart.include.pigx-common-security=/pigx-common-log[\\w-]+\.jar
+restart.include.pigx-common-log=/pigx-common-log[\\w-]+\.jar

+ 1 - 1
pigx-common/pigx-common-security/pom.xml

@@ -29,7 +29,7 @@
 
 	<artifactId>pigx-common-security</artifactId>
 	<packaging>jar</packaging>
-	<name>pigx-common-security</name>
+
 	<description>pigx 安全工具类</description>
 
 

+ 4 - 0
pigx-common/pigx-common-security/src/main/java/com/pig4cloud/pigx/common/security/feign/PigxFeignClientInterceptor.java

@@ -53,6 +53,10 @@ public class PigxFeignClientInterceptor extends OAuth2FeignRequestInterceptor {
 	 */
 	@Override
 	public void apply(RequestTemplate template) {
+		if (template.headers().isEmpty()) {
+			return;
+		}
+
 		if (oAuth2ClientContext != null
 			&& oAuth2ClientContext.getAccessToken() != null) {
 			super.apply(template);

+ 3 - 4
pigx-common/pigx-common-security/src/main/java/com/pig4cloud/pigx/common/security/service/PigxUserDetailsServiceImpl.java

@@ -98,10 +98,9 @@ public class PigxUserDetailsServiceImpl implements PigxUserDetailsService {
 		Collection<? extends GrantedAuthority> authorities
 			= AuthorityUtils.createAuthorityList(dbAuthsSet.toArray(new String[0]));
 		SysUser user = info.getSysUser();
-		boolean enabled = StrUtil.equals(user.getDelFlag(), CommonConstant.STATUS_NORMAL);
-		// 构造security用户
 
-		return new PigxUser(user.getUserId(), user.getDeptId(), user.getUsername(), SecurityConstants.BCRYPT + user.getPassword(), enabled,
-			true, true, true, authorities);
+		// 构造security用户
+		return new PigxUser(user.getUserId(), user.getDeptId(), user.getUsername(), SecurityConstants.BCRYPT + user.getPassword(),
+			StrUtil.equals(user.getDelFlag(), CommonConstant.STATUS_NORMAL),true, true, true, authorities);
 	}
 }

+ 1 - 1
pigx-common/pigx-common-swagger/pom.xml

@@ -29,7 +29,7 @@
 
 	<artifactId>pigx-common-swagger</artifactId>
 	<packaging>jar</packaging>
-	<name>pigx-common-swagger</name>
+
 	<description>pigx 接口文档</description>
 
 

+ 8 - 5
pigx-common/pigx-common-swagger/src/main/java/com/pig4cloud/pigx/common/swagger/config/SwaggerAutoConfiguration.java

@@ -17,7 +17,6 @@
 package com.pig4cloud.pigx.common.swagger.config;
 
 
-import cn.hutool.core.collection.CollUtil;
 import com.google.common.base.Predicate;
 import com.google.common.base.Predicates;
 import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
@@ -34,6 +33,7 @@ import springfox.documentation.spring.web.plugins.Docket;
 import springfox.documentation.swagger2.annotations.EnableSwagger2;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 
@@ -46,7 +46,10 @@ import java.util.List;
 @EnableAutoConfiguration
 public class SwaggerAutoConfiguration {
 
-	private static final String DEFAULT_EXCLUDE_PATH = "/error";
+	/**
+	 * 	默认的排除路径,排除Spring Boot默认的错误处理路径和端点
+	 */
+	private static final List<String> DEFAULT_EXCLUDE_PATH = Arrays.asList("/error","/actuator/**");
 	private static final String BASE_PATH = "/**";
 
 	@Bean
@@ -58,7 +61,7 @@ public class SwaggerAutoConfiguration {
 	@Bean
 	public Docket api(SwaggerProperties swaggerProperties) {
 		// base-path处理
-		if (CollUtil.isEmpty(swaggerProperties.getBasePath())) {
+		if (swaggerProperties.getBasePath().isEmpty()) {
 			swaggerProperties.getBasePath().add(BASE_PATH);
 		}
 		//noinspection unchecked
@@ -66,8 +69,8 @@ public class SwaggerAutoConfiguration {
 		swaggerProperties.getBasePath().forEach(path -> basePath.add(PathSelectors.ant(path)));
 
 		// exclude-path处理
-		if (CollUtil.isEmpty(swaggerProperties.getExcludePath())) {
-			swaggerProperties.getExcludePath().add(DEFAULT_EXCLUDE_PATH);
+		if (swaggerProperties.getExcludePath().isEmpty()) {
+			swaggerProperties.getExcludePath().addAll(DEFAULT_EXCLUDE_PATH);
 		}
 		List<Predicate<String>> excludePath = new ArrayList<>();
 		swaggerProperties.getExcludePath().forEach(path -> excludePath.add(PathSelectors.ant(path)));

+ 1 - 1
pigx-common/pigx-common-transaction/pom.xml

@@ -10,7 +10,7 @@
 
 	<artifactId>pigx-common-transaction</artifactId>
 	<packaging>jar</packaging>
-	<name>pigx-common-transaction</name>
+
 	<description>pigx lcn transaction</description>
 
 	<dependencies>

+ 1 - 1
pigx-common/pom.xml

@@ -29,7 +29,7 @@
 
 	<artifactId>pigx-common</artifactId>
 	<packaging>pom</packaging>
-	<name>pigx-common</name>
+
 	<description>pigx 公共聚合模块</description>
 
 	<modules>

+ 0 - 19
pigx-config/pom.xml

@@ -30,7 +30,6 @@
 	<artifactId>pigx-config</artifactId>
 	<packaging>jar</packaging>
 
-	<name>pigx-config</name>
 	<description>pigx 配置中心,基于spring cloud config</description>
 
 	<dependencies>
@@ -64,28 +63,10 @@
 			<plugin>
 				<groupId>org.springframework.boot</groupId>
 				<artifactId>spring-boot-maven-plugin</artifactId>
-				<configuration>
-					<finalName>${project.name}</finalName>
-				</configuration>
 			</plugin>
 			<plugin>
 				<groupId>com.spotify</groupId>
 				<artifactId>docker-maven-plugin</artifactId>
-				<version>0.4.12</version>
-				<configuration>
-					<imageName>${registry.url}/${project.name}:0.0.1</imageName>
-					<dockerHost>${docker.url}</dockerHost>
-					<dockerDirectory>${project.basedir}</dockerDirectory>
-					<resources>
-						<resource>
-							<targetPath>/</targetPath>
-							<directory>${project.build.directory}</directory>
-							<include>${project.build.finalName}.jar</include>
-						</resource>
-					</resources>
-					<serverId>docker-hub</serverId>
-					<registryUrl>https://index.docker.io/v1/</registryUrl>
-				</configuration>
 			</plugin>
 		</plugins>
 	</build>

+ 13 - 16
pigx-config/src/main/resources/config/application-dev.yml

@@ -72,25 +72,22 @@ mybatis-plus:
 
 #swagger公共信息
 swagger:
-  title: 'PigX Swagger API'
-  description: '全宇宙最牛逼的Spring Cloud微服务开发脚手架'
-  version: '1.4.0'
-  license: 'Powered By PigX'
-  licenseUrl: 'https://gitee.com/log4j/pig/wikis'
-  terms-of-service-url: 'https://gitee.wang/pig/pigx'
-  exclude-path:
-    - /actuator/**
-    - /error
+  title: PigX Swagger API
+  description: 全宇宙最牛逼的Spring Cloud微服务开发脚手架
+  version: 1.6.2
+  license: Powered By PigX
+  licenseUrl: https://pig4cloud.com/
+  terms-of-service-url: https://pig4cloud.com/
   contact:
-    name: '冷冷'
-    email: 'wangiegie@gmail.com'
-    url: 'https://gitee.wang/pig/pigx'
+    name: 冷冷
+    email: wangiegie@gmail.com
+    url: https://pig4cloud.com/about.html
   authorization:
-    name: 'pigX OAuth'
-    auth-regex: '^.*$'
+    name: pigX OAuth
+    auth-regex: ^.*$
     authorization-scope-list:
-      - scope: 'server'
-        description: 'server all'
+      - scope: server
+        description: server all
     token-url-list:
       - ${security.auth.server}/token
 

+ 55 - 0
pigx-config/src/main/resources/logback-spring.xml

@@ -0,0 +1,55 @@
+<?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="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}}" />
+	<!-- 彩色日志依赖的渲染类 -->
+	<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" />
+	<!-- Console log output -->
+	<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+		<encoder>
+			<pattern>${CONSOLE_LOG_PATTERN}</pattern>
+		</encoder>
+	</appender>
+
+	<!-- Log file debug output -->
+	<appender name="debug" class="ch.qos.logback.core.rolling.RollingFileAppender">
+		<file>${log.path}/debug.log</file>
+		<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+			<fileNamePattern>${log.path}/%d{yyyy-MM}/debug.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
+			<maxFileSize>50MB</maxFileSize>
+			<maxHistory>30</maxHistory>
+		</rollingPolicy>
+		<encoder>
+			<pattern>%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n</pattern>
+		</encoder>
+	</appender>
+
+	<!-- Log file error output -->
+	<appender name="error" class="ch.qos.logback.core.rolling.RollingFileAppender">
+		<file>${log.path}/error.log</file>
+		<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+			<fileNamePattern>${log.path}/%d{yyyy-MM}/error.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
+			<maxFileSize>50MB</maxFileSize>
+			<maxHistory>30</maxHistory>
+		</rollingPolicy>
+		<encoder>
+			<pattern>%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n</pattern>
+		</encoder>
+		<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+			<level>ERROR</level>
+		</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>

+ 0 - 19
pigx-eureka/pom.xml

@@ -30,7 +30,6 @@
 	<artifactId>pigx-eureka</artifactId>
 	<packaging>jar</packaging>
 
-	<name>pigx-eureka</name>
 	<description>pigx 服务中心,基于eureka</description>
 
 	<dependencies>
@@ -73,28 +72,10 @@
 			<plugin>
 				<groupId>org.springframework.boot</groupId>
 				<artifactId>spring-boot-maven-plugin</artifactId>
-				<configuration>
-					<finalName>${project.name}</finalName>
-				</configuration>
 			</plugin>
 			<plugin>
 				<groupId>com.spotify</groupId>
 				<artifactId>docker-maven-plugin</artifactId>
-				<version>0.4.12</version>
-				<configuration>
-					<imageName>${registry.url}/${project.name}:0.0.1</imageName>
-					<dockerHost>${docker.url}</dockerHost>
-					<dockerDirectory>${project.basedir}</dockerDirectory>
-					<resources>
-						<resource>
-							<targetPath>/</targetPath>
-							<directory>${project.build.directory}</directory>
-							<include>${project.build.finalName}.jar</include>
-						</resource>
-					</resources>
-					<serverId>docker-hub</serverId>
-					<registryUrl>https://index.docker.io/v1/</registryUrl>
-				</configuration>
 			</plugin>
 		</plugins>
 	</build>

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

@@ -0,0 +1,55 @@
+<?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="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}}" />
+	<!-- 彩色日志依赖的渲染类 -->
+	<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" />
+	<!-- Console log output -->
+	<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+		<encoder>
+			<pattern>${CONSOLE_LOG_PATTERN}</pattern>
+		</encoder>
+	</appender>
+
+	<!-- Log file debug output -->
+	<appender name="debug" class="ch.qos.logback.core.rolling.RollingFileAppender">
+		<file>${log.path}/debug.log</file>
+		<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+			<fileNamePattern>${log.path}/%d{yyyy-MM}/debug.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
+			<maxFileSize>50MB</maxFileSize>
+			<maxHistory>30</maxHistory>
+		</rollingPolicy>
+		<encoder>
+			<pattern>%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n</pattern>
+		</encoder>
+	</appender>
+
+	<!-- Log file error output -->
+	<appender name="error" class="ch.qos.logback.core.rolling.RollingFileAppender">
+		<file>${log.path}/error.log</file>
+		<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+			<fileNamePattern>${log.path}/%d{yyyy-MM}/error.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
+			<maxFileSize>50MB</maxFileSize>
+			<maxHistory>30</maxHistory>
+		</rollingPolicy>
+		<encoder>
+			<pattern>%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n</pattern>
+		</encoder>
+		<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+			<level>ERROR</level>
+		</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 - 19
pigx-gateway/pom.xml

@@ -29,7 +29,7 @@
 
 	<artifactId>pigx-gateway</artifactId>
 	<packaging>jar</packaging>
-	<name>pigx-gateway</name>
+
 	<description>pigx 服务网关,基于 spring cloud gateway</description>
 
 	<dependencies>
@@ -77,28 +77,10 @@
 			<plugin>
 				<groupId>org.springframework.boot</groupId>
 				<artifactId>spring-boot-maven-plugin</artifactId>
-				<configuration>
-					<finalName>${project.name}</finalName>
-				</configuration>
 			</plugin>
 			<plugin>
 				<groupId>com.spotify</groupId>
 				<artifactId>docker-maven-plugin</artifactId>
-				<version>0.4.12</version>
-				<configuration>
-					<imageName>${registry.url}/${project.name}:0.0.1</imageName>
-					<dockerHost>${docker.url}</dockerHost>
-					<dockerDirectory>${project.basedir}</dockerDirectory>
-					<resources>
-						<resource>
-							<targetPath>/</targetPath>
-							<directory>${project.build.directory}</directory>
-							<include>${project.build.finalName}.jar</include>
-						</resource>
-					</resources>
-					<serverId>docker-hub</serverId>
-					<registryUrl>https://index.docker.io/v1/</registryUrl>
-				</configuration>
 			</plugin>
 		</plugins>
 	</build>

+ 1 - 1
pigx-upms/pigx-upms-api/pom.xml

@@ -29,7 +29,7 @@
 
 	<artifactId>pigx-upms-api</artifactId>
 	<packaging>jar</packaging>
-	<name>pigx-upms-api</name>
+
 	<description>pigx 通用用户权限管理系统公共api模块</description>
 
 

+ 0 - 25
pigx-upms/pigx-upms-biz/pom.xml

@@ -30,7 +30,6 @@
 	<artifactId>pigx-upms-biz</artifactId>
 	<packaging>jar</packaging>
 
-	<name>pigx-upms-biz</name>
 	<description>pigx 通用用户权限管理系统业务处理模块</description>
 
 	<dependencies>
@@ -67,12 +66,6 @@
 			<groupId>org.springframework.cloud</groupId>
 			<artifactId>spring-cloud-starter-security</artifactId>
 		</dependency>
-		<!--监控客户端-->
-		<dependency>
-			<groupId>de.codecentric</groupId>
-			<artifactId>spring-boot-admin-starter-client</artifactId>
-			<version>${monitor.version}</version>
-		</dependency>
 		<!--mybatis-->
 		<dependency>
 			<groupId>com.baomidou</groupId>
@@ -108,28 +101,10 @@
 			<plugin>
 				<groupId>org.springframework.boot</groupId>
 				<artifactId>spring-boot-maven-plugin</artifactId>
-				<configuration>
-					<finalName>${project.name}</finalName>
-				</configuration>
 			</plugin>
 			<plugin>
 				<groupId>com.spotify</groupId>
 				<artifactId>docker-maven-plugin</artifactId>
-				<version>0.4.12</version>
-				<configuration>
-					<imageName>${registry.url}/${project.name}:0.0.1</imageName>
-					<dockerHost>${docker.url}</dockerHost>
-					<dockerDirectory>${project.basedir}</dockerDirectory>
-					<resources>
-						<resource>
-							<targetPath>/</targetPath>
-							<directory>${project.build.directory}</directory>
-							<include>${project.build.finalName}.jar</include>
-						</resource>
-					</resources>
-					<serverId>docker-hub</serverId>
-					<registryUrl>https://index.docker.io/v1/</registryUrl>
-				</configuration>
 			</plugin>
 		</plugins>
 	</build>

+ 0 - 1
pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/controller/DictController.java

@@ -71,7 +71,6 @@ public class DictController {
 	 */
 	@GetMapping("/dictPage")
 	public Page dictPage(@RequestParam Map<String, Object> params) {
-		params.put(CommonConstant.DEL_FLAG, CommonConstant.STATUS_NORMAL);
 		return sysDictService.selectPage(new Query<>(params), new EntityWrapper<>());
 	}
 

+ 0 - 2
pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/controller/LogController.java

@@ -25,7 +25,6 @@ import com.baomidou.mybatisplus.plugins.Page;
 import com.pig4cloud.pigx.admin.api.entity.SysLog;
 import com.pig4cloud.pigx.admin.api.vo.PreLogVo;
 import com.pig4cloud.pigx.admin.service.SysLogService;
-import com.pig4cloud.pigx.common.core.constant.CommonConstant;
 import com.pig4cloud.pigx.common.core.util.Query;
 import com.pig4cloud.pigx.common.core.util.R;
 import lombok.AllArgsConstructor;
@@ -58,7 +57,6 @@ public class LogController {
 	 */
 	@GetMapping("/logPage")
 	public Page logPage(@RequestParam Map<String, Object> params) {
-		params.put(CommonConstant.DEL_FLAG, CommonConstant.STATUS_NORMAL);
 		return sysLogService.selectPage(new Query<>(params), new EntityWrapper<>());
 	}
 

+ 0 - 1
pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/controller/RoleController.java

@@ -110,7 +110,6 @@ public class RoleController {
 	 */
 	@GetMapping("/rolePage")
 	public Page rolePage(@RequestParam Map<String, Object> params) {
-		params.put(CommonConstant.DEL_FLAG, CommonConstant.STATUS_NORMAL);
 		return sysRoleService.selectwithDeptPage(new Query<>(params), new EntityWrapper<>());
 	}
 

+ 0 - 7
pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/mapper/SysDeptMapper.java

@@ -41,11 +41,4 @@ public interface SysDeptMapper extends BaseMapper<SysDept> {
 	 * @return 数据列表
 	 */
 	List<SysDept> selectDeptDtoList(String delFlag);
-
-	/**
-	 * 删除部门关系表数据
-	 *
-	 * @param id 部门ID
-	 */
-	void deleteDeptRealtion(Integer id);
 }

+ 12 - 0
pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/mapper/SysDeptRelationMapper.java

@@ -31,5 +31,17 @@ import com.pig4cloud.pigx.admin.api.entity.SysDeptRelation;
  * @since 2018-02-12
  */
 public interface SysDeptRelationMapper extends BaseMapper<SysDeptRelation> {
+	/**
+	 * 删除部门关系表数据
+	 *
+	 * @param id 部门ID
+	 */
+	void deleteAllDeptRealtion(Integer id);
 
+	/**
+	 * 更改部分关系表数据
+	 *
+	 * @param deptRelation
+	 */
+	void updateDeptRealtion(SysDeptRelation deptRelation);
 }

+ 6 - 5
pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/service/impl/SysDeptServiceImpl.java

@@ -100,7 +100,7 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
 		sysDept.setUpdateTime(LocalDateTime.now());
 		sysDept.setDelFlag(CommonConstant.STATUS_DEL);
 		this.deleteById(sysDept);
-		sysDeptMapper.deleteDeptRealtion(id);
+		sysDeptRelationMapper.deleteAllDeptRealtion(id);
 		return Boolean.TRUE;
 	}
 
@@ -114,10 +114,11 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
 	public Boolean updateDeptById(SysDept sysDept) {
 		//更新部门状态
 		this.updateById(sysDept);
-		//删除部门关系
-		sysDeptMapper.deleteDeptRealtion(sysDept.getDeptId());
-		//新建部门关系
-		this.insertDeptRelation(sysDept);
+		//更新部门关系
+		SysDeptRelation relation = new SysDeptRelation();
+		relation.setAncestor(sysDept.getParentId());
+		relation.setDescendant(sysDept.getDeptId());
+		sysDeptRelationMapper.updateDeptRealtion(relation);
 		return Boolean.TRUE;
 	}
 

+ 0 - 19
pigx-upms/pigx-upms-biz/src/main/resources/mapper/SysDeptMapper.xml

@@ -35,25 +35,6 @@
 	<sql id="Base_Column_List">
         dept_id AS deptId, parent_id AS parentId, name, order_num AS orderNum, create_time AS createTime, update_time AS updateTime, del_flag AS delFlag
     </sql>
-	<delete id="deleteDeptRealtion">
-        DELETE
-        FROM
-            sys_dept_relation
-        WHERE
-            descendant IN (
-                SELECT
-                    temp.descendant
-                FROM
-                    (
-                        SELECT
-                            descendant
-                        FROM
-                            sys_dept_relation
-                        WHERE
-                            ancestor = #{id}
-                    ) temp
-            )
-    </delete>
 
 	<!--关联查询部门列表-->
 	<select id="selectDeptDtoList" resultType="com.pig4cloud.pigx.admin.api.entity.SysDept">

+ 37 - 0
pigx-upms/pigx-upms-biz/src/main/resources/mapper/SysDeptRelationMapper.xml

@@ -32,4 +32,41 @@
         ancestor, descendant
     </sql>
 
+	<!-- 更新部门关系 -->
+	<update id="updateDeptRealtion">
+        DELETE FROM sys_dept_relation
+        WHERE
+        	descendant IN ( SELECT temp.descendant FROM
+        	( SELECT descendant FROM sys_dept_relation WHERE ancestor = #{descendant} ) temp )
+        AND ancestor IN ( SELECT temp.ancestor FROM ( SELECT ancestor FROM
+        	sys_dept_relation WHERE descendant = #{descendant} AND ancestor != descendant ) temp );
+
+		INSERT INTO sys_dept_relation (ancestor, descendant)
+		SELECT a.ancestor, b.descendant
+		FROM sys_dept_relation a
+			CROSS JOIN sys_dept_relation b
+		WHERE a.descendant = #{ancestor}
+			AND b.ancestor = #{descendant};
+	</update>
+
+	<!--删除部门-->
+	<delete id="deleteAllDeptRealtion">
+        DELETE
+        FROM
+            sys_dept_relation
+        WHERE
+            descendant IN (
+                SELECT
+                    temp.descendant
+                FROM
+                    (
+                        SELECT
+                            descendant
+                        FROM
+                            sys_dept_relation
+                        WHERE
+                            ancestor = #{id}
+                    ) temp
+            )
+    </delete>
 </mapper>

+ 1 - 1
pigx-upms/pom.xml

@@ -28,7 +28,7 @@
 	</parent>
 
 	<artifactId>pigx-upms</artifactId>
-	<name>pigx-upms</name>
+
 	<description>pigx 通用用户权限管理聚合模块</description>
 	<packaging>pom</packaging>
 

+ 1 - 19
pigx-visual/pigx-codegen/pom.xml

@@ -11,7 +11,7 @@
 
 	<artifactId>pigx-codegen</artifactId>
 	<packaging>jar</packaging>
-	<name>pigx-codegen</name>
+
 	<description>代码生成模块</description>
 
 	<dependencies>
@@ -72,28 +72,10 @@
 			<plugin>
 				<groupId>org.springframework.boot</groupId>
 				<artifactId>spring-boot-maven-plugin</artifactId>
-				<configuration>
-					<finalName>${project.name}</finalName>
-				</configuration>
 			</plugin>
 			<plugin>
 				<groupId>com.spotify</groupId>
 				<artifactId>docker-maven-plugin</artifactId>
-				<version>0.4.12</version>
-				<configuration>
-					<imageName>${registry.url}/${project.name}:0.0.1</imageName>
-					<dockerHost>${docker.url}</dockerHost>
-					<dockerDirectory>${project.basedir}</dockerDirectory>
-					<resources>
-						<resource>
-							<targetPath>/</targetPath>
-							<directory>${project.build.directory}</directory>
-							<include>${project.build.finalName}.jar</include>
-						</resource>
-					</resources>
-					<serverId>docker-hub</serverId>
-					<registryUrl>https://index.docker.io/v1/</registryUrl>
-				</configuration>
 			</plugin>
 		</plugins>
 	</build>

+ 6 - 5
pigx-visual/pigx-codegen/src/main/java/com/pig4cloud/pigx/codegen/util/GenUtils.java

@@ -24,6 +24,7 @@ import cn.hutool.core.util.StrUtil;
 import com.pig4cloud.pigx.codegen.entity.ColumnEntity;
 import com.pig4cloud.pigx.codegen.entity.GenConfig;
 import com.pig4cloud.pigx.codegen.entity.TableEntity;
+import com.pig4cloud.pigx.common.core.constant.CommonConstant;
 import com.pig4cloud.pigx.common.core.exception.CheckedException;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.configuration.Configuration;
@@ -239,7 +240,7 @@ public class GenUtils {
 	 * 获取文件名
 	 */
 	private static String getFileName(String template, String className, String packageName, String moduleName) {
-		String packagePath = "pigx" + File.separator + "src" + File.separator + "main" + File.separator + "java" + File.separator;
+		String packagePath = CommonConstant.BACK_END_PROJECT + File.separator + "src" + File.separator + "main" + File.separator + "java" + File.separator;
 		if (StringUtils.isNotBlank(packageName)) {
 			packagePath += packageName.replace(".", File.separator) + File.separator + moduleName + File.separator;
 		}
@@ -265,7 +266,7 @@ public class GenUtils {
 		}
 
 		if (template.contains(MAPPER_XML_VM)) {
-			return "pigx" + File.separator + "src" + File.separator + "main" + File.separator + "resources" + File.separator + "mapper" + File.separator + className + "Mapper.xml";
+			return CommonConstant.BACK_END_PROJECT + File.separator + "src" + File.separator + "main" + File.separator + "resources" + File.separator + "mapper" + File.separator + className + "Mapper.xml";
 		}
 
 		if (template.contains(MENU_SQL_VM)) {
@@ -273,16 +274,16 @@ public class GenUtils {
 		}
 
 		if (template.contains(INDEX_VUE_VM)) {
-			return "pigx-ui" + File.separator + "src" + File.separator + "views" +
+			return CommonConstant.FRONT_END_PROJECT + File.separator + "src" + File.separator + "views" +
 				File.separator + moduleName + File.separator + className.toLowerCase() + File.separator + "index.vue";
 		}
 
 		if (template.contains(API_JS_VM)) {
-			return "pigx-ui" + File.separator + "src" + File.separator + "api" + File.separator + className.toLowerCase() + ".js";
+			return CommonConstant.FRONT_END_PROJECT + File.separator + "src" + File.separator + "api" + File.separator + className.toLowerCase() + ".js";
 		}
 
 		if (template.contains(CRUD_JS_VM)) {
-			return "pigx-ui" + File.separator + "src" + File.separator + "const" +
+			return CommonConstant.FRONT_END_PROJECT + File.separator + "src" + File.separator + "const" +
 				File.separator + "crud" + File.separator + className.toLowerCase() + ".js";
 		}
 

+ 1 - 19
pigx-visual/pigx-daemon/pom.xml

@@ -28,7 +28,7 @@
 
 	<artifactId>pigx-daemon</artifactId>
 	<packaging>jar</packaging>
-	<name>pigx-daemon</name>
+
 	<description>后台跑批定时任务模块</description>
 
 	<dependencies>
@@ -94,28 +94,10 @@
 			<plugin>
 				<groupId>org.springframework.boot</groupId>
 				<artifactId>spring-boot-maven-plugin</artifactId>
-				<configuration>
-					<finalName>${project.name}</finalName>
-				</configuration>
 			</plugin>
 			<plugin>
 				<groupId>com.spotify</groupId>
 				<artifactId>docker-maven-plugin</artifactId>
-				<version>0.4.12</version>
-				<configuration>
-					<imageName>${registry.url}/${project.name}:0.0.1</imageName>
-					<dockerHost>${docker.url}</dockerHost>
-					<dockerDirectory>${project.basedir}</dockerDirectory>
-					<resources>
-						<resource>
-							<targetPath>/</targetPath>
-							<directory>${project.build.directory}</directory>
-							<include>${project.build.finalName}.jar</include>
-						</resource>
-					</resources>
-					<serverId>docker-hub</serverId>
-					<registryUrl>https://index.docker.io/v1/</registryUrl>
-				</configuration>
 			</plugin>
 		</plugins>
 	</build>

+ 0 - 19
pigx-visual/pigx-monitor/pom.xml

@@ -30,7 +30,6 @@
 	<artifactId>pigx-monitor</artifactId>
 	<packaging>jar</packaging>
 
-	<name>pigx-monitor</name>
 	<description>pigx 监控模块,基于 spring boot admin</description>
 
 	<dependencies>
@@ -69,28 +68,10 @@
 			<plugin>
 				<groupId>org.springframework.boot</groupId>
 				<artifactId>spring-boot-maven-plugin</artifactId>
-				<configuration>
-					<finalName>${project.name}</finalName>
-				</configuration>
 			</plugin>
 			<plugin>
 				<groupId>com.spotify</groupId>
 				<artifactId>docker-maven-plugin</artifactId>
-				<version>0.4.12</version>
-				<configuration>
-					<imageName>${registry.url}/${project.name}:0.0.1</imageName>
-					<dockerHost>${docker.url}</dockerHost>
-					<dockerDirectory>${project.basedir}</dockerDirectory>
-					<resources>
-						<resource>
-							<targetPath>/</targetPath>
-							<directory>${project.build.directory}</directory>
-							<include>${project.build.finalName}.jar</include>
-						</resource>
-					</resources>
-					<serverId>docker-hub</serverId>
-					<registryUrl>https://index.docker.io/v1/</registryUrl>
-				</configuration>
 			</plugin>
 		</plugins>
 	</build>

+ 0 - 4
pigx-visual/pigx-tx-manager/pom.xml

@@ -11,7 +11,6 @@
 	<artifactId>pigx-tx-manager</artifactId>
 	<packaging>jar</packaging>
 
-	<name>pigx-tx-manager</name>
 	<description>pigx lcn tx manager</description>
 
 	<dependencies>
@@ -72,9 +71,6 @@
 			<plugin>
 				<groupId>org.springframework.boot</groupId>
 				<artifactId>spring-boot-maven-plugin</artifactId>
-				<configuration>
-					<finalName>${project.name}</finalName>
-				</configuration>
 			</plugin>
 		</plugins>
 	</build>

+ 0 - 1
pigx-visual/pom.xml

@@ -28,7 +28,6 @@
 	</parent>
 
 	<artifactId>pigx-visual</artifactId>
-	<name>pigx-visual</name>
 	<description>pigx 图形化功能模块</description>
 	<packaging>pom</packaging>
 

+ 46 - 23
pom.xml

@@ -25,26 +25,20 @@
 	<groupId>com.pig4cloud</groupId>
 	<artifactId>pigx</artifactId>
 	<version>${pigx.version}</version>
-	<name>pigx</name>
+	<name>${project.artifactId}</name>
 	<packaging>pom</packaging>
 	<url>https://www.pig4cloud.com</url>
 
-	<parent>
-		<groupId>org.springframework.boot</groupId>
-		<artifactId>spring-boot-starter-parent</artifactId>
-		<version>2.0.4.RELEASE</version>
-		<relativePath/>
-	</parent>
-
 	<properties>
-		<pigx.version>1.6.1</pigx.version>
+		<pigx.version>1.6.2</pigx.version>
 		<spring-boot.version>2.0.4.RELEASE</spring-boot.version>
 		<spring-cloud.version>Finchley.SR1</spring-cloud.version>
+		<spring-platform.version>Cairo-SR3</spring-platform.version>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 		<maven.compiler.source>1.8</maven.compiler.source>
 		<maven.compiler.target>1.8</maven.compiler.target>
 		<monitor.version>2.0.2</monitor.version>
-		<hutool.version>4.1.7</hutool.version>
+		<hutool.version>4.1.13</hutool.version>
 		<mbp.boot.version>2.3</mbp.boot.version>
 		<kaptcha.version>0.0.9</kaptcha.version>
 		<swagger.version>2.9.2</swagger.version>
@@ -105,7 +99,6 @@
 			<artifactId>spring-boot-starter-test</artifactId>
 			<scope>test</scope>
 		</dependency>
-
 	</dependencies>
 
 	<modules>
@@ -120,10 +113,17 @@
 
 	<dependencyManagement>
 		<dependencies>
+			<dependency>
+				<groupId>org.springframework.boot</groupId>
+				<artifactId>spring-boot-dependencies</artifactId>
+				<version>${spring-boot.version}</version>
+				<type>pom</type>
+				<scope>import</scope>
+			</dependency>
 			<dependency>
 				<groupId>io.spring.platform</groupId>
 				<artifactId>platform-bom</artifactId>
-				<version>Cairo-SR2</version>
+				<version>${spring-platform.version}</version>
 				<type>pom</type>
 				<scope>import</scope>
 			</dependency>
@@ -138,31 +138,54 @@
 	</dependencyManagement>
 
 	<build>
+		<finalName>${project.name}</finalName>
 		<pluginManagement>
 			<plugins>
 				<plugin>
 					<groupId>org.springframework.boot</groupId>
 					<artifactId>spring-boot-maven-plugin</artifactId>
 					<version>${spring-boot.version}</version>
+					<configuration>
+						<finalName>${project.build.finalName}</finalName>
+					</configuration>
 					<executions>
 						<execution>
 							<goals>
-								<goal>build-info</goal>
+								<goal>repackage</goal>
 							</goals>
 						</execution>
 					</executions>
 				</plugin>
 				<plugin>
-					<artifactId>maven-compiler-plugin</artifactId>
+					<groupId>com.spotify</groupId>
+					<artifactId>docker-maven-plugin</artifactId>
+					<version>0.4.12</version>
 					<configuration>
-						<target>${java.version}</target>
-						<source>${java.version}</source>
-						<encoding>UTF-8</encoding>
+						<imageName>${registry.url}/${project.name}:0.0.1</imageName>
+						<dockerHost>${docker.url}</dockerHost>
+						<dockerDirectory>${project.basedir}</dockerDirectory>
+						<resources>
+							<resource>
+								<targetPath>/</targetPath>
+								<directory>${project.build.directory}</directory>
+								<include>${project.build.finalName}.jar</include>
+							</resource>
+						</resources>
+						<serverId>docker-hub</serverId>
+						<registryUrl>https://index.docker.io/v1/</registryUrl>
 					</configuration>
 				</plugin>
 			</plugins>
 		</pluginManagement>
 		<plugins>
+			<plugin>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<configuration>
+					<target>${maven.compiler.target}</target>
+					<source>${maven.compiler.source}</source>
+					<encoding>UTF-8</encoding>
+				</configuration>
+			</plugin>
 			<plugin>
 				<groupId>pl.project13.maven</groupId>
 				<artifactId>git-commit-id-plugin</artifactId>
@@ -170,17 +193,17 @@
 		</plugins>
 	</build>
 
-	<!-- 使用aliyun镜像 -->
 	<repositories>
-		<repository>
-			<id>spring-milestones</id>
-			<name>Spring Milestones</name>
-			<url>https://repo.spring.io/libs-milestone</url>
-		</repository>
+		<!--使用阿里云镜像-->
 		<repository>
 			<id>aliyun</id>
 			<name>aliyun</name>
 			<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
 		</repository>
+		<repository>
+			<id>spring-milestones</id>
+			<name>Spring Milestones</name>
+			<url>https://repo.spring.io/libs-milestone</url>
+		</repository>
 	</repositories>
 </project>