diff --git a/README.md b/README.md
index 4fb2df09b8ce9dc3280d807c087b80a6c2c3e06e..3076829989beebe3f2fc93aed1c04922325e7577 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,14 @@
-
-
-
+
+
+
## 系统说明
-- 基于 Spring Cloud Hoxton 、Spring Boot 2.3、 OAuth2 的 RBAC **权限管理系统**
+- 基于 Spring Cloud Hoxton 、Spring Boot 2.4、 OAuth2 的 RBAC **权限管理系统**
- 基于数据驱动视图的理念封装 element-ui,即使没有 vue 的使用经验也能快速上手
- 提供对常见容器化支持 Docker、Kubernetes、Rancher2 支持
- 提供 lambda 、stream api 、webflux 的生产实践
@@ -17,8 +17,8 @@
| 依赖 | 版本 |
| ---------------------- | ------------- |
-| Spring Boot | 2.3.7.RELEASE |
-| Spring Cloud | Hoxton.SR9 |
+| Spring Boot | 2.4.1 |
+| Spring Cloud | 2020 |
| Spring Cloud Alibaba | 2.2.3.RELEASE |
| Spring Security OAuth2 | 2.3.6 |
| Mybatis Plus | 3.4.1 |
@@ -40,7 +40,7 @@ pig
├── pig-common-mybatis -- mybatis 扩展封装
├── pig-common-security -- 安全工具类
├── pig-common-swagger -- 接口文档
- ├── pig-common-sentinel -- sentinel 扩展封装
+ ├── pig-common-feign -- feign 扩展封装
└── pig-common-test -- oauth2.0 单元测试扩展封装
├── pig-register -- Nacos Server[8848]
├── pig-gateway -- Spring Cloud Gateway网关[9999]
diff --git a/db/pig_config.sql b/db/pig_config.sql
index 125c2b15778ecadb9fcff6c0fc4eba7fec5af6e7..849abf4e883940af3cd6ab07aa95753605b9c6d6 100644
--- a/db/pig_config.sql
+++ b/db/pig_config.sql
@@ -36,7 +36,7 @@ CREATE TABLE `config_info` (
-- Records of config_info
-- ----------------------------
BEGIN;
-INSERT INTO `config_info` VALUES (1, 'application-dev.yml', 'DEFAULT_GROUP', '# 加解密根密码\njasypt:\n encryptor:\n password: pig #根密码\n\n# Spring 相关\nspring:\n redis:\n password:\n host: pig-redis\n cloud:\n sentinel:\n eager: true\n transport:\n dashboard: pig-sentinel:5003\n\n# 暴露监控端点\nmanagement:\n endpoints:\n web:\n exposure:\n include: \'*\'\n\n# feign 配置\nfeign:\n sentinel:\n enabled: true\n okhttp:\n enabled: true\n httpclient:\n enabled: false\n client:\n config:\n default:\n connectTimeout: 10000\n readTimeout: 10000\n compression:\n request:\n enabled: true\n response:\n enabled: true\n\n#请求处理的超时时间\nribbon:\n ReadTimeout: 10000\n ConnectTimeout: 10000\n\n# mybaits-plus配置\nmybatis-plus:\n mapper-locations: classpath:/mapper/*Mapper.xml\n global-config:\n banner: false\n db-config:\n id-type: auto\n table-underline: true\n logic-delete-value: 1\n logic-not-delete-value: 0\n configuration:\n map-underscore-to-camel-case: true\n\n# spring security 配置\nsecurity:\n oauth2:\n resource:\n loadBalanced: true\n token-info-uri: http://pig-auth/oauth/check_token\n # 通用放行URL,服务个性化,请在对应配置文件覆盖\n ignore:\n urls:\n - /v2/api-docs\n - /actuator/**\n# swagger 配置\nswagger:\n title: Pig Swagger API\n license: Powered By pig4cloud\n licenseUrl: https://pig4cloud.com\n terms-of-service-url: https://pig4cloud.com\n contact:\n email: wangiegie@gmail.com\n url: https://pig4cloud.com\n authorization:\n name: pig4cloud OAuth\n auth-regex: ^.*$\n authorization-scope-list:\n - scope: server\n description: server all\n token-url-list:\n - http://${GATEWAY_HOST:pig-gateway}:${GATEWAY-PORT:9999}/auth/oauth/token', '841de89cde20a1a045f46001f9a89266', '2019-11-29 16:31:20', '2020-06-11 16:28:09', NULL, '127.0.0.1', '', '', '通用配置', 'null', 'null', 'yaml', 'null');
+INSERT INTO `config_info` VALUES (1, 'application-dev.yml', 'DEFAULT_GROUP', '# 加解密根密码\njasypt:\n encryptor:\n password: pig #根密码\n\n# Spring 相关\nspring:\n redis:\n password:\n host: pig-redis\n cloud:\n sentinel:\n eager: true\n transport:\n dashboard: pig-sentinel:5003\n\n# 暴露监控端点\nmanagement:\n endpoints:\n web:\n exposure:\n include: \'*\'\n\n# feign 配置\nfeign:\n sentinel:\n enabled: true\n okhttp:\n enabled: true\n httpclient:\n enabled: false\n client:\n config:\n default:\n connectTimeout: 10000\n readTimeout: 10000\n compression:\n request:\n enabled: true\n response:\n enabled: true\n\n# mybaits-plus配置\nmybatis-plus:\n mapper-locations: classpath:/mapper/*Mapper.xml\n global-config:\n banner: false\n db-config:\n id-type: auto\n table-underline: true\n logic-delete-value: 1\n logic-not-delete-value: 0\n configuration:\n map-underscore-to-camel-case: true\n\n# spring security 配置\nsecurity:\n oauth2:\n resource:\n loadBalanced: true\n token-info-uri: http://pig-auth/oauth/check_token\n # 通用放行URL,服务个性化,请在对应配置文件覆盖\n ignore:\n urls:\n - /v2/api-docs\n - /actuator/**\n# swagger 配置\nswagger:\n title: Pig Swagger API\n license: Powered By pig4cloud\n licenseUrl: https://pig4cloud.com\n terms-of-service-url: https://pig4cloud.com\n contact:\n email: wangiegie@gmail.com\n url: https://pig4cloud.com\n authorization:\n name: pig4cloud OAuth\n auth-regex: ^.*$\n authorization-scope-list:\n - scope: server\n description: server all\n token-url-list:\n - http://${GATEWAY_HOST:pig-gateway}:${GATEWAY-PORT:9999}/auth/oauth/token', '9a17f1e09f13f48de43977954dc2bd66', '2019-11-29 16:31:20', '2020-12-23 11:35:46', NULL, '0:0:0:0:0:0:0:1', '', '', '通用配置', 'null', 'null', 'yaml', 'null');
INSERT INTO `config_info` VALUES (2, 'pig-auth-dev.yml', 'DEFAULT_GROUP', '# 数据源\nspring:\n datasource:\n type: com.zaxxer.hikari.HikariDataSource\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: root\n password: root\n url: jdbc:mysql://pig-mysql:3306/pig?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai\n freemarker:\n allow-request-override: false\n allow-session-override: false\n cache: true\n charset: UTF-8\n check-template-location: true\n content-type: text/html\n enabled: true\n expose-request-attributes: false\n expose-session-attributes: false\n expose-spring-macro-helpers: true\n prefer-file-system-access: true\n suffix: .ftl\n template-loader-path: classpath:/templates/', '58b1b48a2888f49e667864be32edf9c1', '2019-11-29 16:31:48', '2020-01-01 18:30:58', NULL, '127.0.0.1', '', '', '认证中心配置', 'null', 'null', 'yaml', 'null');
INSERT INTO `config_info` VALUES (3, 'pig-codegen-dev.yml', 'DEFAULT_GROUP', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(27v1agvAug87ANOVnbKdsw==)\n client-secret: ENC(VbnkopxrwgbFVKp+UxJ2pg==)\n scope: server\n\n# 数据源配置\nspring:\n datasource:\n type: com.zaxxer.hikari.HikariDataSource\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: root\n password: root\n url: jdbc:mysql://pig-mysql:3306/pig_codegen?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai\n resources:\n static-locations: classpath:/static/,classpath:/views/\n\n# 直接放行URL\nignore:\n urls:\n - /v2/api-docs\n - /actuator/**\n', 'abc702838b34d11b46e96143ccd9f367', '2019-11-29 16:32:12', '2019-11-29 16:32:12', NULL, '127.0.0.1', '', '', '代码生成配置', NULL, NULL, 'yaml', NULL);
INSERT INTO `config_info` VALUES (4, 'pig-gateway-dev.yml', 'DEFAULT_GROUP', 'spring:\n cloud:\n gateway:\n locator:\n enabled: true\n routes:\n # 认证中心\n - id: pig-auth\n uri: lb://pig-auth\n predicates:\n - Path=/auth/**\n filters:\n # 验证码处理\n - ValidateCodeGatewayFilter\n # 前端密码解密\n - PasswordDecoderFilter\n #UPMS 模块\n - id: pig-upms-biz\n uri: lb://pig-upms-biz\n predicates:\n - Path=/admin/**\n filters:\n # 限流配置\n - name: RequestRateLimiter\n args:\n key-resolver: \'#{@remoteAddrKeyResolver}\'\n redis-rate-limiter.replenishRate: 100\n redis-rate-limiter.burstCapacity: 200\n # 代码生成模块\n - id: pig-codegen\n uri: lb://pig-codegen\n predicates:\n - Path=/gen/**\n\n\ngateway:\n encode-key: \'thanks,pig4cloud\'\n ignore-clients:\n - test\n\nswagger:\n ignore-providers:\n - pig-auth\n - pig-codegen\n', '5cd71b235930c78e700819b944a14446', '2019-11-29 16:32:42', '2020-10-09 17:10:45', NULL, '0:0:0:0:0:0:0:1', '', '', '网关配置', '', '', 'yaml', '');
diff --git a/pig-auth/pom.xml b/pig-auth/pom.xml
index a57e657c57dabcf8e0bfc977ec9edc13d5d55356..f0257b2d163585a40783412b37f2a0053c7dd553 100755
--- a/pig-auth/pom.xml
+++ b/pig-auth/pom.xml
@@ -21,7 +21,7 @@
com.pig4cloud
pig
- 2.10.4-SNAPSHOT
+ 3.0.0
pig-auth
@@ -43,20 +43,20 @@
com.pig4cloud
- pig-common-sentinel
- 2.10.4-SNAPSHOT
+ pig-common-feign
+ 3.0.0
com.pig4cloud
pig-upms-api
- 2.10.4-SNAPSHOT
+ 3.0.0
com.pig4cloud
pig-common-security
- 2.10.4-SNAPSHOT
+ 3.0.0
diff --git a/pig-auth/src/main/java/com/pig4cloud/pig/auth/PigAuthApplication.java b/pig-auth/src/main/java/com/pig4cloud/pig/auth/PigAuthApplication.java
index fbdb8350fbe3b83658f7c6517843635f1148a272..39c3c7fff24a234017fb3f86d1edba8a9b41f84b 100755
--- a/pig-auth/src/main/java/com/pig4cloud/pig/auth/PigAuthApplication.java
+++ b/pig-auth/src/main/java/com/pig4cloud/pig/auth/PigAuthApplication.java
@@ -16,7 +16,7 @@
package com.pig4cloud.pig.auth;
-import com.pig4cloud.pig.common.security.annotation.EnablePigFeignClients;
+import com.pig4cloud.pig.common.feign.annotation.EnablePigFeignClients;
import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication;
@@ -24,8 +24,8 @@ import org.springframework.cloud.client.SpringCloudApplication;
* @author lengleng
* @date 2018年06月21日 认证授权中心
*/
-@SpringCloudApplication
@EnablePigFeignClients
+@SpringCloudApplication
public class PigAuthApplication {
public static void main(String[] args) {
diff --git a/pig-common/pig-common-core/pom.xml b/pig-common/pig-common-core/pom.xml
index cdcf525aae77c78067596295769fb945ac637c25..aa587695f4aa1724ee75c253fc3126fea345498b 100755
--- a/pig-common/pig-common-core/pom.xml
+++ b/pig-common/pig-common-core/pom.xml
@@ -21,7 +21,7 @@
com.pig4cloud
pig-common
- 2.10.4-SNAPSHOT
+ 3.0.0
pig-common-core
diff --git a/pig-common/pig-common-datasource/pom.xml b/pig-common/pig-common-datasource/pom.xml
index d87b0de19da8042c7bcb7924a2405b94285f5c2a..5666393980e30f16eec52f331a1437665884f610 100644
--- a/pig-common/pig-common-datasource/pom.xml
+++ b/pig-common/pig-common-datasource/pom.xml
@@ -21,7 +21,7 @@
pig-common
com.pig4cloud
- 2.10.4-SNAPSHOT
+ 3.0.0
4.0.0
diff --git a/pig-common/pig-common-sentinel/pom.xml b/pig-common/pig-common-feign/pom.xml
similarity index 77%
rename from pig-common/pig-common-sentinel/pom.xml
rename to pig-common/pig-common-feign/pom.xml
index 4d08f6d1f27b6b496f0986bbc667548fc08c919c..079209a1b742dd709453385ce491916bb5843c54 100755
--- a/pig-common/pig-common-sentinel/pom.xml
+++ b/pig-common/pig-common-feign/pom.xml
@@ -21,18 +21,19 @@
com.pig4cloud
pig-common
- 2.10.4-SNAPSHOT
+ 3.0.0
4.0.0
jar
- pig-common-sentinel
- sentinel服务降级熔断、限流组件
+ pig-common-feign
+ feign-sentinel服务降级熔断、限流组件
+
com.pig4cloud
pig-common-core
- 2.10.4-SNAPSHOT
+ 3.0.0
com.alibaba.cloud
@@ -43,6 +44,16 @@
org.springframework.cloud
spring-cloud-starter-openfeign
+
+
+ io.github.openfeign
+ feign-okhttp
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-loadbalancer
+
org.springframework.security
diff --git a/pig-common/pig-common-sentinel/src/main/java/com/pig4cloud/pig/common/sentinel/SentinelAutoConfiguration.java b/pig-common/pig-common-feign/src/main/java/com/pig4cloud/pig/common/feign/PigFeignAutoConfiguration.java
similarity index 86%
rename from pig-common/pig-common-sentinel/src/main/java/com/pig4cloud/pig/common/sentinel/SentinelAutoConfiguration.java
rename to pig-common/pig-common-feign/src/main/java/com/pig4cloud/pig/common/feign/PigFeignAutoConfiguration.java
index 6673d161be368b2d8146a1c3e38638c12acc4fef..293c52fa038d6b5b095189fe1c75fa864a8dd9be 100755
--- a/pig-common/pig-common-sentinel/src/main/java/com/pig4cloud/pig/common/sentinel/SentinelAutoConfiguration.java
+++ b/pig-common/pig-common-feign/src/main/java/com/pig4cloud/pig/common/feign/PigFeignAutoConfiguration.java
@@ -14,14 +14,14 @@
* limitations under the License.
*/
-package com.pig4cloud.pig.common.sentinel;
+package com.pig4cloud.pig.common.feign;
import com.alibaba.cloud.sentinel.feign.SentinelFeignAutoConfiguration;
import com.alibaba.csp.sentinel.adapter.spring.webmvc.callback.BlockExceptionHandler;
import com.alibaba.csp.sentinel.adapter.spring.webmvc.callback.RequestOriginParser;
-import com.pig4cloud.pig.common.sentinel.feign.PigSentinelFeign;
-import com.pig4cloud.pig.common.sentinel.handle.PigUrlBlockHandler;
-import com.pig4cloud.pig.common.sentinel.parser.PigHeaderRequestOriginParser;
+import com.pig4cloud.pig.common.feign.ext.PigSentinelFeign;
+import com.pig4cloud.pig.common.feign.handle.PigUrlBlockHandler;
+import com.pig4cloud.pig.common.feign.parser.PigHeaderRequestOriginParser;
import feign.Feign;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
@@ -38,7 +38,7 @@ import org.springframework.context.annotation.Scope;
*/
@Configuration(proxyBeanMethods = false)
@AutoConfigureBefore(SentinelFeignAutoConfiguration.class)
-public class SentinelAutoConfiguration {
+public class PigFeignAutoConfiguration {
@Bean
@Scope("prototype")
diff --git a/pig-common/pig-common-security/src/main/java/com/pig4cloud/pig/common/security/annotation/EnablePigFeignClients.java b/pig-common/pig-common-feign/src/main/java/com/pig4cloud/pig/common/feign/annotation/EnablePigFeignClients.java
similarity index 91%
rename from pig-common/pig-common-security/src/main/java/com/pig4cloud/pig/common/security/annotation/EnablePigFeignClients.java
rename to pig-common/pig-common-feign/src/main/java/com/pig4cloud/pig/common/feign/annotation/EnablePigFeignClients.java
index 998a4eae4795782e4822241439d1c45f50aee66b..fdc8a57bc92a1d40559e3e5ee984f45f06c6e22a 100755
--- a/pig-common/pig-common-security/src/main/java/com/pig4cloud/pig/common/security/annotation/EnablePigFeignClients.java
+++ b/pig-common/pig-common-feign/src/main/java/com/pig4cloud/pig/common/feign/annotation/EnablePigFeignClients.java
@@ -14,8 +14,9 @@
* limitations under the License.
*/
-package com.pig4cloud.pig.common.security.annotation;
+package com.pig4cloud.pig.common.feign.annotation;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.cloud.openfeign.EnableFeignClients;
import java.lang.annotation.*;
@@ -28,6 +29,7 @@ import java.lang.annotation.*;
@Retention(RetentionPolicy.RUNTIME)
@Documented
@EnableFeignClients
+@EnableAutoConfiguration(excludeName = "org.springframework.cloud.netflix.ribbon.RibbonAutoConfiguration")
public @interface EnablePigFeignClients {
/**
diff --git a/pig-common/pig-common-sentinel/src/main/java/com/pig4cloud/pig/common/sentinel/feign/PigSentinelFeign.java b/pig-common/pig-common-feign/src/main/java/com/pig4cloud/pig/common/feign/ext/PigSentinelFeign.java
similarity index 97%
rename from pig-common/pig-common-sentinel/src/main/java/com/pig4cloud/pig/common/sentinel/feign/PigSentinelFeign.java
rename to pig-common/pig-common-feign/src/main/java/com/pig4cloud/pig/common/feign/ext/PigSentinelFeign.java
index 8de4bd6e14d4199150116b1b6f741cabff30ce13..50fb63336ae89203deec75370d03f169a41110c8 100644
--- a/pig-common/pig-common-sentinel/src/main/java/com/pig4cloud/pig/common/sentinel/feign/PigSentinelFeign.java
+++ b/pig-common/pig-common-feign/src/main/java/com/pig4cloud/pig/common/feign/ext/PigSentinelFeign.java
@@ -14,15 +14,15 @@
* limitations under the License.
*/
-package com.pig4cloud.pig.common.sentinel.feign;
+package com.pig4cloud.pig.common.feign.ext;
import com.alibaba.cloud.sentinel.feign.SentinelContractHolder;
import feign.Contract;
import feign.Feign;
import feign.InvocationHandlerFactory;
import feign.Target;
-import feign.hystrix.FallbackFactory;
import org.springframework.beans.BeansException;
+import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.cloud.openfeign.FeignContext;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
diff --git a/pig-common/pig-common-sentinel/src/main/java/com/pig4cloud/pig/common/sentinel/feign/PigSentinelInvocationHandler.java b/pig-common/pig-common-feign/src/main/java/com/pig4cloud/pig/common/feign/ext/PigSentinelInvocationHandler.java
similarity index 98%
rename from pig-common/pig-common-sentinel/src/main/java/com/pig4cloud/pig/common/sentinel/feign/PigSentinelInvocationHandler.java
rename to pig-common/pig-common-feign/src/main/java/com/pig4cloud/pig/common/feign/ext/PigSentinelInvocationHandler.java
index 72a8023d2f28174fa680efd23cf7bcf61e55aa6d..031f0968a3c2d8d72fa0c29f76aff1e6b1005fd0 100644
--- a/pig-common/pig-common-sentinel/src/main/java/com/pig4cloud/pig/common/sentinel/feign/PigSentinelInvocationHandler.java
+++ b/pig-common/pig-common-feign/src/main/java/com/pig4cloud/pig/common/feign/ext/PigSentinelInvocationHandler.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.pig4cloud.pig.common.sentinel.feign;
+package com.pig4cloud.pig.common.feign.ext;
import com.alibaba.cloud.sentinel.feign.SentinelContractHolder;
import com.alibaba.cloud.sentinel.feign.SentinelInvocationHandler;
@@ -29,8 +29,8 @@ import feign.Feign;
import feign.InvocationHandlerFactory;
import feign.MethodMetadata;
import feign.Target;
-import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
+import org.springframework.cloud.openfeign.FallbackFactory;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
diff --git a/pig-common/pig-common-sentinel/src/main/java/com/pig4cloud/pig/common/sentinel/handle/GlobalBizExceptionHandler.java b/pig-common/pig-common-feign/src/main/java/com/pig4cloud/pig/common/feign/handle/GlobalBizExceptionHandler.java
similarity index 98%
rename from pig-common/pig-common-sentinel/src/main/java/com/pig4cloud/pig/common/sentinel/handle/GlobalBizExceptionHandler.java
rename to pig-common/pig-common-feign/src/main/java/com/pig4cloud/pig/common/feign/handle/GlobalBizExceptionHandler.java
index baf011c06aca8c879db81bc1302acf2ac2192d02..b69df1b3da8355fd8c3a61f74d8b716a3d737596 100644
--- a/pig-common/pig-common-sentinel/src/main/java/com/pig4cloud/pig/common/sentinel/handle/GlobalBizExceptionHandler.java
+++ b/pig-common/pig-common-feign/src/main/java/com/pig4cloud/pig/common/feign/handle/GlobalBizExceptionHandler.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.pig4cloud.pig.common.sentinel.handle;
+package com.pig4cloud.pig.common.feign.handle;
import com.alibaba.csp.sentinel.Tracer;
import com.pig4cloud.pig.common.core.util.R;
diff --git a/pig-common/pig-common-sentinel/src/main/java/com/pig4cloud/pig/common/sentinel/handle/PigUrlBlockHandler.java b/pig-common/pig-common-feign/src/main/java/com/pig4cloud/pig/common/feign/handle/PigUrlBlockHandler.java
similarity index 97%
rename from pig-common/pig-common-sentinel/src/main/java/com/pig4cloud/pig/common/sentinel/handle/PigUrlBlockHandler.java
rename to pig-common/pig-common-feign/src/main/java/com/pig4cloud/pig/common/feign/handle/PigUrlBlockHandler.java
index a5d556c909ce4fb4c1286a5291528dc1b12b0d85..afd4843989da0782c47ce02623d94253d906f853 100644
--- a/pig-common/pig-common-sentinel/src/main/java/com/pig4cloud/pig/common/sentinel/handle/PigUrlBlockHandler.java
+++ b/pig-common/pig-common-feign/src/main/java/com/pig4cloud/pig/common/feign/handle/PigUrlBlockHandler.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.pig4cloud.pig.common.sentinel.handle;
+package com.pig4cloud.pig.common.feign.handle;
import cn.hutool.http.ContentType;
import cn.hutool.json.JSONUtil;
diff --git a/pig-common/pig-common-sentinel/src/main/java/com/pig4cloud/pig/common/sentinel/parser/PigHeaderRequestOriginParser.java b/pig-common/pig-common-feign/src/main/java/com/pig4cloud/pig/common/feign/parser/PigHeaderRequestOriginParser.java
similarity index 96%
rename from pig-common/pig-common-sentinel/src/main/java/com/pig4cloud/pig/common/sentinel/parser/PigHeaderRequestOriginParser.java
rename to pig-common/pig-common-feign/src/main/java/com/pig4cloud/pig/common/feign/parser/PigHeaderRequestOriginParser.java
index 3a04d846673ea6c9da9233ced4de4a3d2d6edb90..00422510c50a0713b53b2bfbfa5aa3dea02c7053 100644
--- a/pig-common/pig-common-sentinel/src/main/java/com/pig4cloud/pig/common/sentinel/parser/PigHeaderRequestOriginParser.java
+++ b/pig-common/pig-common-feign/src/main/java/com/pig4cloud/pig/common/feign/parser/PigHeaderRequestOriginParser.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.pig4cloud.pig.common.sentinel.parser;
+package com.pig4cloud.pig.common.feign.parser;
import com.alibaba.csp.sentinel.adapter.spring.webmvc.callback.RequestOriginParser;
diff --git a/pig-common/pig-common-feign/src/main/resources/META-INF/spring.factories b/pig-common/pig-common-feign/src/main/resources/META-INF/spring.factories
new file mode 100755
index 0000000000000000000000000000000000000000..e1d16f1aaf98d43bb4a4afb9f0fa160fc7c39e3e
--- /dev/null
+++ b/pig-common/pig-common-feign/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,3 @@
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+ com.pig4cloud.pig.common.feign.PigFeignAutoConfiguration,\
+ com.pig4cloud.pig.common.feign.handle.GlobalBizExceptionHandler
diff --git a/pig-common/pig-common-job/pom.xml b/pig-common/pig-common-job/pom.xml
index 47535e792de6cc1c82ab3171a3dc0cc5947bca57..4495854d3b990b70465338ad969469fd6ef2d941 100755
--- a/pig-common/pig-common-job/pom.xml
+++ b/pig-common/pig-common-job/pom.xml
@@ -23,7 +23,7 @@
com.pig4cloud
pig-common
- 2.10.4-SNAPSHOT
+ 3.0.0
pig-common-job
diff --git a/pig-common/pig-common-log/pom.xml b/pig-common/pig-common-log/pom.xml
index bbca0e2877752b2145bd51e489e9002553031b92..ec65138eee885e905a95a45801e9bba3c22d962b 100755
--- a/pig-common/pig-common-log/pom.xml
+++ b/pig-common/pig-common-log/pom.xml
@@ -21,7 +21,7 @@
com.pig4cloud
pig-common
- 2.10.4-SNAPSHOT
+ 3.0.0
pig-common-log
@@ -35,13 +35,13 @@
com.pig4cloud
pig-common-core
- 2.10.4-SNAPSHOT
+ 3.0.0
com.pig4cloud
pig-upms-api
- 2.10.4-SNAPSHOT
+ 3.0.0
diff --git a/pig-common/pig-common-mybatis/pom.xml b/pig-common/pig-common-mybatis/pom.xml
index ac6723d1673868ddf8efa82d1d82b4b3d8e48292..dfc2093be02cead6e3543fc7d9fdb979b3b2f7aa 100755
--- a/pig-common/pig-common-mybatis/pom.xml
+++ b/pig-common/pig-common-mybatis/pom.xml
@@ -21,7 +21,7 @@
com.pig4cloud
pig-common
- 2.10.4-SNAPSHOT
+ 3.0.0
pig-common-mybatis
diff --git a/pig-common/pig-common-security/pom.xml b/pig-common/pig-common-security/pom.xml
index f3a16065b1758f4ff760261ae2ce98a22e59fa75..3f8429f89894f736965b1a4769a02f357e0d3bf5 100755
--- a/pig-common/pig-common-security/pom.xml
+++ b/pig-common/pig-common-security/pom.xml
@@ -21,7 +21,7 @@
com.pig4cloud
pig-common
- 2.10.4-SNAPSHOT
+ 3.0.0
pig-common-security
@@ -35,7 +35,7 @@
com.pig4cloud
pig-common-core
- 2.10.4-SNAPSHOT
+ 3.0.0
@@ -50,7 +50,7 @@
com.pig4cloud
pig-upms-api
- 2.10.4-SNAPSHOT
+ 3.0.0
diff --git a/pig-common/pig-common-sentinel/src/main/resources/META-INF/spring.factories b/pig-common/pig-common-sentinel/src/main/resources/META-INF/spring.factories
deleted file mode 100755
index bf8f296150b23b4252b89190f652a439bfeb6001..0000000000000000000000000000000000000000
--- a/pig-common/pig-common-sentinel/src/main/resources/META-INF/spring.factories
+++ /dev/null
@@ -1,3 +0,0 @@
-org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
- com.pig4cloud.pig.common.sentinel.SentinelAutoConfiguration,\
- com.pig4cloud.pig.common.sentinel.handle.GlobalBizExceptionHandler
diff --git a/pig-common/pig-common-swagger/pom.xml b/pig-common/pig-common-swagger/pom.xml
index 3a0b1398c448562ef47fd1052dda69142f6eec59..66d258cb2de29343eae92c508f10e14ecf539e78 100644
--- a/pig-common/pig-common-swagger/pom.xml
+++ b/pig-common/pig-common-swagger/pom.xml
@@ -24,7 +24,7 @@
com.pig4cloud
pig-common
- 2.10.4-SNAPSHOT
+ 3.0.0
pig-common-swagger
@@ -59,7 +59,7 @@
org.springframework.cloud
- spring-cloud-gateway-core
+ spring-cloud-gateway-server
provided
diff --git a/pig-common/pig-common-test/pom.xml b/pig-common/pig-common-test/pom.xml
index 42ae5dfb5aa76b842aedb700cb6a4558632033f6..b834596351c0ef84ea89c17adb210387997a30cb 100755
--- a/pig-common/pig-common-test/pom.xml
+++ b/pig-common/pig-common-test/pom.xml
@@ -6,7 +6,7 @@
com.pig4cloud
pig-common
- 2.10.4-SNAPSHOT
+ 3.0.0
pig-common-test
@@ -18,7 +18,7 @@
com.pig4cloud
pig-common-security
- 2.10.4-SNAPSHOT
+ 3.0.0
org.springframework.security
diff --git a/pig-common/pom.xml b/pig-common/pom.xml
index 612caac22b6c6b9f8333636951316969e935a4e6..2e68962d39ccaf9b4001bd57408697ff3a0902e7 100755
--- a/pig-common/pom.xml
+++ b/pig-common/pom.xml
@@ -21,7 +21,7 @@
com.pig4cloud
pig
- 2.10.4-SNAPSHOT
+ 3.0.0
pig-common
@@ -36,7 +36,7 @@
pig-common-log
pig-common-mybatis
pig-common-security
- pig-common-sentinel
+ pig-common-feign
pig-common-swagger
pig-common-test
diff --git a/pig-gateway/pom.xml b/pig-gateway/pom.xml
index 0ac54a1613074ab0debecb292dea9ec7ed04a7c3..81f2f2ba2d6aa80b60ac9bbc7ef189cf611674d1 100755
--- a/pig-gateway/pom.xml
+++ b/pig-gateway/pom.xml
@@ -21,7 +21,7 @@
com.pig4cloud
pig
- 2.10.4-SNAPSHOT
+ 3.0.0
pig-gateway
@@ -55,8 +55,13 @@
spring-cloud-alibaba-sentinel-gateway
- com.pig4cloud
- pig-common-sentinel
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-sentinel
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-loadbalancer
@@ -64,6 +69,11 @@
captcha-spring-boot-starter
${captcha.version}
+
+
+ com.pig4cloud
+ pig-common-core
+
com.pig4cloud
diff --git a/pig-register/pom.xml b/pig-register/pom.xml
index e09414a32ac79f07abbc7947b8d5911a664ae836..356f64762ea7e9db318a036a86fb0dc750209777 100755
--- a/pig-register/pom.xml
+++ b/pig-register/pom.xml
@@ -18,7 +18,7 @@
com.pig4cloud
pig
- 2.10.4-SNAPSHOT
+ 3.0.0
pig-register
diff --git a/pig-upms/pig-upms-api/pom.xml b/pig-upms/pig-upms-api/pom.xml
index fa1a12805551ce1e22add1755cc0606f8d345a56..992d9502c40c59a17cdd45181a14c99a6293f795 100755
--- a/pig-upms/pig-upms-api/pom.xml
+++ b/pig-upms/pig-upms-api/pom.xml
@@ -21,7 +21,7 @@
com.pig4cloud
pig-upms
- 2.10.4-SNAPSHOT
+ 3.0.0
pig-upms-api
@@ -41,5 +41,10 @@
org.springframework.cloud
spring-cloud-starter-openfeign
+
+
+ com.pig4cloud
+ pig-common-feign
+
diff --git a/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/feign/factory/RemoteLogServiceFallbackFactory.java b/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/feign/factory/RemoteLogServiceFallbackFactory.java
index 897e2e2df309e1988ae4028b3203a154c3bd96bf..c271649998cf862ec73b43744dcdc1653fb85b82 100755
--- a/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/feign/factory/RemoteLogServiceFallbackFactory.java
+++ b/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/feign/factory/RemoteLogServiceFallbackFactory.java
@@ -18,7 +18,7 @@ package com.pig4cloud.pig.admin.api.feign.factory;
import com.pig4cloud.pig.admin.api.feign.RemoteLogService;
import com.pig4cloud.pig.admin.api.feign.fallback.RemoteLogServiceFallbackImpl;
-import feign.hystrix.FallbackFactory;
+import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
/**
diff --git a/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/feign/factory/RemoteTokenServiceFallbackFactory.java b/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/feign/factory/RemoteTokenServiceFallbackFactory.java
index 18ebea595722199b4f4d963126b14b2ff7a9cc25..817cf9f8c760e48e6d5a06807072750e00e126e2 100755
--- a/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/feign/factory/RemoteTokenServiceFallbackFactory.java
+++ b/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/feign/factory/RemoteTokenServiceFallbackFactory.java
@@ -18,7 +18,7 @@ package com.pig4cloud.pig.admin.api.feign.factory;
import com.pig4cloud.pig.admin.api.feign.RemoteTokenService;
import com.pig4cloud.pig.admin.api.feign.fallback.RemoteTokenServiceFallbackImpl;
-import feign.hystrix.FallbackFactory;
+import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
/**
diff --git a/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/feign/factory/RemoteUserServiceFallbackFactory.java b/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/feign/factory/RemoteUserServiceFallbackFactory.java
index 4acaf8ddf974cd22351bb0f7ee00bdba47fe7b13..06f53ecba529aeacfefc431d5aba736e98b7bdbd 100755
--- a/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/feign/factory/RemoteUserServiceFallbackFactory.java
+++ b/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/feign/factory/RemoteUserServiceFallbackFactory.java
@@ -18,7 +18,7 @@ package com.pig4cloud.pig.admin.api.feign.factory;
import com.pig4cloud.pig.admin.api.feign.RemoteUserService;
import com.pig4cloud.pig.admin.api.feign.fallback.RemoteUserServiceFallbackImpl;
-import feign.hystrix.FallbackFactory;
+import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
/**
diff --git a/pig-upms/pig-upms-biz/pom.xml b/pig-upms/pig-upms-biz/pom.xml
index 7fe0873b93c579a4fa76865e0d8a9fc2312ee6d7..a1213f53b660b654e3033dc5fbdffb76da10baca 100644
--- a/pig-upms/pig-upms-biz/pom.xml
+++ b/pig-upms/pig-upms-biz/pom.xml
@@ -21,7 +21,7 @@
com.pig4cloud
pig-upms
- 2.10.4-SNAPSHOT
+ 3.0.0
pig-upms-biz
@@ -65,11 +65,6 @@
com.alibaba.cloud
spring-cloud-starter-alibaba-nacos-config
-
-
- com.pig4cloud
- pig-common-sentinel
-
org.springframework.boot
diff --git a/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/PigAdminApplication.java b/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/PigAdminApplication.java
index e305d4c1caea5c0cd41a0b0603ccb07b611886f5..20d2a2e8ed04ca8e192a33f083a8abed0ea89883 100644
--- a/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/PigAdminApplication.java
+++ b/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/PigAdminApplication.java
@@ -16,7 +16,7 @@
package com.pig4cloud.pig.admin;
-import com.pig4cloud.pig.common.security.annotation.EnablePigFeignClients;
+import com.pig4cloud.pig.common.feign.annotation.EnablePigFeignClients;
import com.pig4cloud.pig.common.security.annotation.EnablePigResourceServer;
import com.pig4cloud.pig.common.swagger.annotation.EnablePigSwagger2;
import org.springframework.boot.SpringApplication;
diff --git a/pig-upms/pom.xml b/pig-upms/pom.xml
index d8c23f75fe3d52b3f337027cb3e1cee104fd4ee2..7ab9904c67d1dfa34db553f07906734682676337 100755
--- a/pig-upms/pom.xml
+++ b/pig-upms/pom.xml
@@ -21,7 +21,7 @@
com.pig4cloud
pig
- 2.10.4-SNAPSHOT
+ 3.0.0
pig-upms
diff --git a/pig-visual/pig-codegen/pom.xml b/pig-visual/pig-codegen/pom.xml
index 51be4d6279827049eb1ad31022545d5cd14e76de..be7e0db6c6b82d447f7463b7991a0c109d5d78eb 100755
--- a/pig-visual/pig-codegen/pom.xml
+++ b/pig-visual/pig-codegen/pom.xml
@@ -22,7 +22,7 @@
com.pig4cloud
pig-visual
- 2.10.4-SNAPSHOT
+ 3.0.0
pig-codegen
@@ -49,7 +49,7 @@
com.pig4cloud
- pig-common-sentinel
+ pig-common-feign
diff --git a/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/PigCodeGenApplication.java b/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/PigCodeGenApplication.java
index 4052e835c469198a03febe08b1b22145c3111c09..4192c58a0f8cadbb23c01e19c8832a8e99618c95 100755
--- a/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/PigCodeGenApplication.java
+++ b/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/PigCodeGenApplication.java
@@ -17,7 +17,7 @@
package com.pig4cloud.pig.codegen;
import com.pig4cloud.pig.common.datasource.annotation.EnableDynamicDataSource;
-import com.pig4cloud.pig.common.security.annotation.EnablePigFeignClients;
+import com.pig4cloud.pig.common.feign.annotation.EnablePigFeignClients;
import com.pig4cloud.pig.common.security.annotation.EnablePigResourceServer;
import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication;
diff --git a/pig-visual/pig-monitor/pom.xml b/pig-visual/pig-monitor/pom.xml
index 8bf417261bb5d1c7773a3b1d7f253a18e210bafc..821c426707ce94a7f61dc5897f7c2a54ccbaed83 100755
--- a/pig-visual/pig-monitor/pom.xml
+++ b/pig-visual/pig-monitor/pom.xml
@@ -21,7 +21,7 @@
com.pig4cloud
pig-visual
- 2.10.4-SNAPSHOT
+ 3.0.0
pig-monitor
@@ -49,7 +49,7 @@
com.pig4cloud
- pig-common-sentinel
+ pig-common-feign
diff --git a/pig-visual/pig-sentinel-dashboard/pom.xml b/pig-visual/pig-sentinel-dashboard/pom.xml
index c12f0d71f628b29cb57d1fc25a2109b8b60ad8d0..c89e1f9b00ed8cb6af809bd849feacd47e6e1776 100755
--- a/pig-visual/pig-sentinel-dashboard/pom.xml
+++ b/pig-visual/pig-sentinel-dashboard/pom.xml
@@ -6,7 +6,7 @@
com.pig4cloud
pig-visual
- 2.10.4-SNAPSHOT
+ 3.0.0
pig-sentinel-dashboard
diff --git a/pig-visual/pig-xxl-job-admin/pom.xml b/pig-visual/pig-xxl-job-admin/pom.xml
index 94bae1e4cda111d6852f4042011536b876ac6a9a..927e8f93a369f56a75b73c27bd4361533fbb3106 100644
--- a/pig-visual/pig-xxl-job-admin/pom.xml
+++ b/pig-visual/pig-xxl-job-admin/pom.xml
@@ -4,7 +4,7 @@
com.pig4cloud
pig-visual
- 2.10.4-SNAPSHOT
+ 3.0.0
pig-xxl-job-admin
diff --git a/pig-visual/pom.xml b/pig-visual/pom.xml
index 05e2f330bb73fca87189d38b197dde7bd7ad4238..37fb3b08b020fa185159d20446dca8de8a37fb1a 100755
--- a/pig-visual/pom.xml
+++ b/pig-visual/pom.xml
@@ -21,7 +21,7 @@
com.pig4cloud
pig
- 2.10.4-SNAPSHOT
+ 3.0.0
pig-visual
diff --git a/pom.xml b/pom.xml
index 39feeb5424856187e3b9de4fc17386ed3f6f185a..531393d96dabc67ba77879927834cce0b5a0b56e 100755
--- a/pom.xml
+++ b/pom.xml
@@ -23,20 +23,19 @@
com.pig4cloud
pig-cloud-dependencies-parent
- 2.10.4-SNAPSHOT
-
+ 3.0.0
com.pig4cloud
pig
- 2.10.4-SNAPSHOT
+ 3.0.0
${project.artifactId}
pom
https://www.pig4cloud.com
- 2.3.7.RELEASE
- Hoxton.SR9
+ 2.4.1
+ 2020.0.0
2.2.3.RELEASE
UTF-8
1.8
@@ -44,7 +43,7 @@
2.3.1
5.5.3
3.4.1
- 3.2.1
+ 3.2.0
2.2.0
1.7
2.1.0
@@ -59,6 +58,11 @@
+
+
+ org.springframework.cloud
+ spring-cloud-starter-bootstrap
+
org.springframework.boot
@@ -193,18 +197,6 @@
-
-
-
- nexus-snapshots
- nexus Snapshots
- https://nexus.pigx.vip/repository/maven-public/
-
- true
-
-
-
-
dev
@@ -218,4 +210,5 @@
+