From 44dffda5017c28d82a58d13fa3bef38ceff8c208 Mon Sep 17 00:00:00 2001 From: lbw Date: Fri, 26 Jan 2024 13:28:04 +0800 Subject: [PATCH 1/6] =?UTF-8?q?:bug:=20Fixing=20a=20bug.=20=E5=9F=BA?= =?UTF-8?q?=E7=A1=80=E7=B1=BB=E5=9E=8B=E4=B8=AD=E7=9A=84=E8=AE=A4=E8=AF=81?= =?UTF-8?q?=E5=AF=B9=E8=B1=A1=E6=8E=88=E6=9D=83=E7=B1=BB=E5=9E=8B=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/OAuth2ResourceOwnerBaseAuthenticationProvider.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pig-auth/src/main/java/com/pig4cloud/pig/auth/support/base/OAuth2ResourceOwnerBaseAuthenticationProvider.java b/pig-auth/src/main/java/com/pig4cloud/pig/auth/support/base/OAuth2ResourceOwnerBaseAuthenticationProvider.java index 22044ec1..5f1aa468 100644 --- a/pig-auth/src/main/java/com/pig4cloud/pig/auth/support/base/OAuth2ResourceOwnerBaseAuthenticationProvider.java +++ b/pig-auth/src/main/java/com/pig4cloud/pig/auth/support/base/OAuth2ResourceOwnerBaseAuthenticationProvider.java @@ -147,14 +147,14 @@ public abstract class OAuth2ResourceOwnerBaseAuthenticationProvider Date: Sun, 28 Jan 2024 17:10:28 +0800 Subject: [PATCH 2/6] =?UTF-8?q?:recycle:=20Refactoring=20code.=20=E9=87=8D?= =?UTF-8?q?=E6=9E=84=E7=BD=91=E5=85=B3Form=20Body=20read=20=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E6=8F=90=E5=8D=87=E6=80=A7=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/constant/SecurityConstants.java | 10 -- .../gateway/config/GatewayConfiguration.java | 34 +++- .../gateway/filter/PasswordDecoderFilter.java | 150 +++++------------- .../filter/ValidateCodeGatewayFilter.java | 93 ++++++----- .../handler/GlobalExceptionHandler.java | 2 +- 5 files changed, 120 insertions(+), 169 deletions(-) diff --git a/pig-common/pig-common-core/src/main/java/com/pig4cloud/pig/common/core/constant/SecurityConstants.java b/pig-common/pig-common-core/src/main/java/com/pig4cloud/pig/common/core/constant/SecurityConstants.java index fe757be2..6254d0a4 100755 --- a/pig-common/pig-common-core/src/main/java/com/pig4cloud/pig/common/core/constant/SecurityConstants.java +++ b/pig-common/pig-common-core/src/main/java/com/pig4cloud/pig/common/core/constant/SecurityConstants.java @@ -47,11 +47,6 @@ public interface SecurityConstants { */ String FROM = "from"; - /** - * 请求header - */ - String HEADER_FROM_IN = FROM + "=" + FROM_IN; - /** * 默认登录URL */ @@ -82,11 +77,6 @@ public interface SecurityConstants { */ String NOOP = "{noop}"; - /*** - * 资源服务器默认bean名称 - */ - String RESOURCE_SERVER_CONFIGURER = "resourceServerConfigurerAdapter"; - /** * 用户名 */ diff --git a/pig-gateway/src/main/java/com/pig4cloud/pig/gateway/config/GatewayConfiguration.java b/pig-gateway/src/main/java/com/pig4cloud/pig/gateway/config/GatewayConfiguration.java index ceaaeed7..094fcc95 100644 --- a/pig-gateway/src/main/java/com/pig4cloud/pig/gateway/config/GatewayConfiguration.java +++ b/pig-gateway/src/main/java/com/pig4cloud/pig/gateway/config/GatewayConfiguration.java @@ -7,6 +7,7 @@ import com.pig4cloud.pig.gateway.filter.ValidateCodeGatewayFilter; import com.pig4cloud.pig.gateway.handler.GlobalExceptionHandler; import com.pig4cloud.pig.gateway.handler.ImageCodeHandler; import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.cloud.gateway.filter.factory.rewrite.ModifyRequestBodyGatewayFilterFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.data.redis.core.RedisTemplate; @@ -20,27 +21,56 @@ import org.springframework.data.redis.core.RedisTemplate; @EnableConfigurationProperties(GatewayConfigProperties.class) public class GatewayConfiguration { + /** + * 创建密码解码器过滤器 + * @param modifyRequestBodyGatewayFilterFactory 修改请求体网关过滤器工厂 + * @param configProperties 配置属性 + * @return 密码解码器过滤器 + */ @Bean - public PasswordDecoderFilter passwordDecoderFilter(GatewayConfigProperties configProperties) { - return new PasswordDecoderFilter(configProperties); + public PasswordDecoderFilter passwordDecoderFilter( + ModifyRequestBodyGatewayFilterFactory modifyRequestBodyGatewayFilterFactory, + GatewayConfigProperties configProperties) { + return new PasswordDecoderFilter(modifyRequestBodyGatewayFilterFactory, configProperties); } + /** + * 创建PigRequest全局过滤器 + * @return PigRequest全局过滤器 + */ @Bean public PigRequestGlobalFilter pigRequestGlobalFilter() { return new PigRequestGlobalFilter(); } + /** + * 创建验证码网关过滤器 + * @param configProperties 配置属性 + * @param objectMapper 对象映射器 + * @param redisTemplate Redis模板 + * @return 验证码网关过滤器 + */ @Bean public ValidateCodeGatewayFilter validateCodeGatewayFilter(GatewayConfigProperties configProperties, ObjectMapper objectMapper, RedisTemplate redisTemplate) { return new ValidateCodeGatewayFilter(configProperties, objectMapper, redisTemplate); } + /** + * 创建全局异常处理程序 + * @param objectMapper 对象映射器 + * @return 全局异常处理程序 + */ @Bean public GlobalExceptionHandler globalExceptionHandler(ObjectMapper objectMapper) { return new GlobalExceptionHandler(objectMapper); } + /** + * 创建图片验证码处理器 + * @param redisTemplate Redis模板 + * @return 图片验证码处理器 + */ @Bean public ImageCodeHandler imageCodeHandler(RedisTemplate redisTemplate) { return new ImageCodeHandler(redisTemplate); diff --git a/pig-gateway/src/main/java/com/pig4cloud/pig/gateway/filter/PasswordDecoderFilter.java b/pig-gateway/src/main/java/com/pig4cloud/pig/gateway/filter/PasswordDecoderFilter.java index 61c18ef6..d6ce2e9c 100755 --- a/pig-gateway/src/main/java/com/pig4cloud/pig/gateway/filter/PasswordDecoderFilter.java +++ b/pig-gateway/src/main/java/com/pig4cloud/pig/gateway/filter/PasswordDecoderFilter.java @@ -29,28 +29,14 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.cloud.gateway.filter.GatewayFilter; import org.springframework.cloud.gateway.filter.factory.AbstractGatewayFilterFactory; -import org.springframework.cloud.gateway.filter.factory.rewrite.CachedBodyOutputMessage; -import org.springframework.cloud.gateway.support.BodyInserterContext; -import org.springframework.core.io.buffer.DataBuffer; -import org.springframework.http.HttpHeaders; -import org.springframework.http.MediaType; -import org.springframework.http.codec.HttpMessageReader; +import org.springframework.cloud.gateway.filter.factory.rewrite.ModifyRequestBodyGatewayFilterFactory; import org.springframework.http.server.reactive.ServerHttpRequest; -import org.springframework.http.server.reactive.ServerHttpRequestDecorator; -import org.springframework.web.reactive.function.BodyInserter; -import org.springframework.web.reactive.function.BodyInserters; -import org.springframework.web.reactive.function.server.HandlerStrategies; -import org.springframework.web.reactive.function.server.ServerRequest; -import org.springframework.web.server.ServerWebExchange; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.SecretKeySpec; import java.nio.charset.Charset; -import java.util.List; import java.util.Map; -import java.util.function.Function; /** * @author lengleng @@ -60,107 +46,55 @@ import java.util.function.Function; @RequiredArgsConstructor public class PasswordDecoderFilter extends AbstractGatewayFilterFactory { - private static final List> messageReaders = HandlerStrategies.withDefaults().messageReaders(); + private final ModifyRequestBodyGatewayFilterFactory modifyRequestBodyFilter; - private static final String PASSWORD = "password"; + private static final String PASSWORD = "password"; - private static final String KEY_ALGORITHM = "AES"; + private static final String KEY_ALGORITHM = "AES"; - private final GatewayConfigProperties gatewayConfig; + private final GatewayConfigProperties gatewayConfig; - static { - // 关闭hutool 强制关闭Bouncy Castle库的依赖 - SecureUtil.disableBouncyCastle(); - } + static { + // 关闭hutool 强制关闭Bouncy Castle库的依赖 + SecureUtil.disableBouncyCastle(); + } - @Override - public GatewayFilter apply(Object config) { - return (exchange, chain) -> { - ServerHttpRequest request = exchange.getRequest(); - // 1. 不是登录请求,直接向下执行 - if (!StrUtil.containsAnyIgnoreCase(request.getURI().getPath(), SecurityConstants.OAUTH_TOKEN_URL)) { - return chain.filter(exchange); - } + @Override + public GatewayFilter apply(Object config) { + return (exchange, chain) -> { + ServerHttpRequest request = exchange.getRequest(); + // 不是登录请求,直接向下执行 + if (!StrUtil.containsAnyIgnoreCase(request.getURI().getPath(), SecurityConstants.OAUTH_TOKEN_URL)) { + return chain.filter(exchange); + } - // 2. 不是密码登录模式直接跳过 - String grantType = request.getQueryParams().getFirst("grant_type"); - if (!StrUtil.equals(SecurityConstants.PASSWORD, grantType)) { - return chain.filter(exchange); - } + return modifyRequestBodyFilter + .apply(new ModifyRequestBodyGatewayFilterFactory.Config().setRewriteFunction(String.class, String.class, + (webExchange, body) -> Mono.just(modifyRequestPassword(body)))) + .filter(exchange, chain); + }; + } - // 3. 前端加密密文解密逻辑 - Class inClass = String.class; - Class outClass = String.class; - ServerRequest serverRequest = ServerRequest.create(exchange, messageReaders); + /** + * 修改请求报文的密码密文为名为 + * @param requestBody 请求报文 + * @return 修改后的报文 + */ + private String modifyRequestPassword(String requestBody) { + // 构建前端对应解密AES 因子 + AES aes = new AES(Mode.CFB, Padding.NoPadding, + new SecretKeySpec(gatewayConfig.getEncodeKey().getBytes(), KEY_ALGORITHM), + new IvParameterSpec(gatewayConfig.getEncodeKey().getBytes())); - // 4. 解密生成新的报文 - Mono modifiedBody = serverRequest.bodyToMono(inClass).flatMap(decryptAES()); + // 获取请求密码并解密 + Map inParamsMap = HttpUtil.decodeParamMap(requestBody, CharsetUtil.CHARSET_UTF_8); + if (inParamsMap.containsKey(PASSWORD)) { + String password = aes.decryptStr(inParamsMap.get(PASSWORD)); + // 返回修改后报文字符 + inParamsMap.put(PASSWORD, password); + } - BodyInserter bodyInserter = BodyInserters.fromPublisher(modifiedBody, outClass); - HttpHeaders headers = new HttpHeaders(); - headers.putAll(exchange.getRequest().getHeaders()); - headers.remove(HttpHeaders.CONTENT_LENGTH); - - headers.set(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED_VALUE); - CachedBodyOutputMessage outputMessage = new CachedBodyOutputMessage(exchange, headers); - return bodyInserter.insert(outputMessage, new BodyInserterContext()).then(Mono.defer(() -> { - ServerHttpRequest decorator = decorate(exchange, headers, outputMessage); - return chain.filter(exchange.mutate().request(decorator).build()); - })); - }; - } - - /** - * 原文解密 - * - * @return - */ - private Function decryptAES() { - return s -> { - // 构建前端对应解密AES 因子 - AES aes = new AES(Mode.CFB, Padding.NoPadding, - new SecretKeySpec(gatewayConfig.getEncodeKey().getBytes(), KEY_ALGORITHM), - new IvParameterSpec(gatewayConfig.getEncodeKey().getBytes())); - - // 获取请求密码并解密 - Map inParamsMap = HttpUtil.decodeParamMap((String) s, CharsetUtil.CHARSET_UTF_8); - if (inParamsMap.containsKey(PASSWORD)) { - String password = aes.decryptStr(inParamsMap.get(PASSWORD)); - // 返回修改后报文字符 - inParamsMap.put(PASSWORD, password); - } else { - log.error("非法请求数据:{}", s); - } - return Mono.just(HttpUtil.toParams(inParamsMap, Charset.defaultCharset(), true)); - }; - } - - /** - * 报文转换 - * - * @return - */ - private ServerHttpRequestDecorator decorate(ServerWebExchange exchange, HttpHeaders headers, - CachedBodyOutputMessage outputMessage) { - return new ServerHttpRequestDecorator(exchange.getRequest()) { - @Override - public HttpHeaders getHeaders() { - long contentLength = headers.getContentLength(); - HttpHeaders httpHeaders = new HttpHeaders(); - httpHeaders.putAll(super.getHeaders()); - if (contentLength > 0) { - httpHeaders.setContentLength(contentLength); - } else { - httpHeaders.set(HttpHeaders.TRANSFER_ENCODING, "chunked"); - } - return httpHeaders; - } - - @Override - public Flux getBody() { - return outputMessage.getBody(); - } - }; - } + return HttpUtil.toParams(inParamsMap, Charset.defaultCharset(), true); + } } diff --git a/pig-gateway/src/main/java/com/pig4cloud/pig/gateway/filter/ValidateCodeGatewayFilter.java b/pig-gateway/src/main/java/com/pig4cloud/pig/gateway/filter/ValidateCodeGatewayFilter.java index d23e433a..20c1943b 100644 --- a/pig-gateway/src/main/java/com/pig4cloud/pig/gateway/filter/ValidateCodeGatewayFilter.java +++ b/pig-gateway/src/main/java/com/pig4cloud/pig/gateway/filter/ValidateCodeGatewayFilter.java @@ -17,14 +17,14 @@ package com.pig4cloud.pig.gateway.filter; import cn.hutool.core.text.CharSequenceUtil; +import cn.hutool.core.util.CharsetUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; -import com.fasterxml.jackson.core.JsonProcessingException; +import cn.hutool.http.HttpUtil; import com.fasterxml.jackson.databind.ObjectMapper; import com.pig4cloud.pig.common.core.constant.CacheConstants; import com.pig4cloud.pig.common.core.constant.SecurityConstants; import com.pig4cloud.pig.common.core.exception.ValidateCodeException; -import com.pig4cloud.pig.common.core.util.R; import com.pig4cloud.pig.common.core.util.WebUtils; import com.pig4cloud.pig.gateway.config.GatewayConfigProperties; import lombok.RequiredArgsConstructor; @@ -32,13 +32,15 @@ import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import org.springframework.cloud.gateway.filter.GatewayFilter; import org.springframework.cloud.gateway.filter.factory.AbstractGatewayFilterFactory; +import org.springframework.cloud.gateway.support.ServerWebExchangeUtils; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.data.redis.core.RedisTemplate; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; import org.springframework.http.server.reactive.ServerHttpRequest; -import org.springframework.http.server.reactive.ServerHttpResponse; -import reactor.core.publisher.Mono; + +import java.nio.CharBuffer; +import java.nio.charset.StandardCharsets; +import java.util.Map; +import java.util.Objects; /** * The type Validate code gateway filter. @@ -56,68 +58,63 @@ public class ValidateCodeGatewayFilter extends AbstractGatewayFilterFactory redisTemplate; + /** + * 应用网关过滤器 + * @param config 配置对象 + * @return 网关过滤器 + */ @Override public GatewayFilter apply(Object config) { + return (exchange, chain) -> { ServerHttpRequest request = exchange.getRequest(); - boolean isAuthToken = CharSequenceUtil.containsAnyIgnoreCase(request.getURI().getPath(), - SecurityConstants.OAUTH_TOKEN_URL); - // 不是登录请求,直接向下执行 - if (!isAuthToken) { - return chain.filter(exchange); - } - - // 刷新token,手机号登录(也可以这里进行校验) 直接向下执行 - String grantType = request.getQueryParams().getFirst("grant_type"); - if (StrUtil.equals(SecurityConstants.REFRESH_TOKEN, grantType)) { + if (!StrUtil.containsAnyIgnoreCase(request.getURI().getPath(), SecurityConstants.OAUTH_TOKEN_URL)) { return chain.filter(exchange); } + // 客户端配置跳过,直接向下执行 boolean isIgnoreClient = configProperties.getIgnoreClients().contains(WebUtils.getClientId(request)); - try { - // only oauth and the request not in ignore clients need check code. - if (!isIgnoreClient) { - checkCode(request); + if (isIgnoreClient) { + return chain.filter(exchange); + } + + // 构建缓存body,可重复读获取form data + return ServerWebExchangeUtils.cacheRequestBody(exchange, (serverHttpRequest) -> { + // get cacheRequestBody + DataBuffer cachedRequestBody = exchange.getAttribute("cachedRequestBody"); + CharBuffer charBuffer = StandardCharsets.UTF_8 + .decode(Objects.requireNonNull(cachedRequestBody).asByteBuffer()); + Map requestBodyMap = HttpUtil.decodeParamMap(charBuffer.toString(), + CharsetUtil.CHARSET_UTF_8); + // 刷新请求跳过,直接向下执行 + if (StrUtil.equals(SecurityConstants.REFRESH_TOKEN, requestBodyMap.get("grant_type"))) { + return chain.filter(exchange); } - } - catch (Exception e) { - ServerHttpResponse response = exchange.getResponse(); - response.setStatusCode(HttpStatus.PRECONDITION_REQUIRED); - response.getHeaders().setContentType(MediaType.APPLICATION_JSON); - final String errMsg = e.getMessage(); - return response.writeWith(Mono.create(monoSink -> { - try { - byte[] bytes = objectMapper.writeValueAsBytes(R.failed(errMsg)); - DataBuffer dataBuffer = response.bufferFactory().wrap(bytes); + // 根据 randomStr 参数判断验证码是否正常 + String code = requestBodyMap.get("code"); + String randomStr = requestBodyMap.getOrDefault("randomStr", + requestBodyMap.get(SecurityConstants.SMS_PARAMETER_NAME)); + checkCode(code, randomStr); - monoSink.success(dataBuffer); - } - catch (JsonProcessingException jsonProcessingException) { - log.error("对象输出异常", jsonProcessingException); - monoSink.error(jsonProcessingException); - } - })); - } - - return chain.filter(exchange); + return chain.filter(exchange.mutate().request(serverHttpRequest).build()); + }); }; } + /** + * 检查验证码,错误扔出 ValidateCodeException GlobalExceptionHandler统一处理 + * @param code 验证码 + * @param randomStr 请求参数 + * @throws ValidateCodeException 验证码异常 + */ @SneakyThrows - private void checkCode(ServerHttpRequest request) { - String code = request.getQueryParams().getFirst("code"); - + private void checkCode(String code, String randomStr) { if (CharSequenceUtil.isBlank(code)) { throw new ValidateCodeException("验证码不能为空"); } - String randomStr = request.getQueryParams().getFirst("randomStr"); - if (CharSequenceUtil.isBlank(randomStr)) { - randomStr = request.getQueryParams().getFirst(SecurityConstants.SMS_PARAMETER_NAME); - } - String key = CacheConstants.DEFAULT_CODE_KEY + randomStr; Object codeObj = redisTemplate.opsForValue().get(key); diff --git a/pig-gateway/src/main/java/com/pig4cloud/pig/gateway/handler/GlobalExceptionHandler.java b/pig-gateway/src/main/java/com/pig4cloud/pig/gateway/handler/GlobalExceptionHandler.java index ee9f98fd..a79a96f9 100644 --- a/pig-gateway/src/main/java/com/pig4cloud/pig/gateway/handler/GlobalExceptionHandler.java +++ b/pig-gateway/src/main/java/com/pig4cloud/pig/gateway/handler/GlobalExceptionHandler.java @@ -61,7 +61,7 @@ public class GlobalExceptionHandler implements ErrorWebExceptionHandler { return response.writeWith(Mono.fromSupplier(() -> { DataBufferFactory bufferFactory = response.bufferFactory(); try { - log.warn("Error Spring Cloud Gateway : {} {}", exchange.getRequest().getPath(), ex.getMessage()); + log.debug("Error Spring Cloud Gateway : {} {}", exchange.getRequest().getPath(), ex.getMessage()); return bufferFactory.wrap(objectMapper.writeValueAsBytes(R.failed(ex.getMessage()))); } catch (JsonProcessingException e) { From f1cb9f8eb28a1d0df3eb4bacd9abc73ed471d90f Mon Sep 17 00:00:00 2001 From: lbw Date: Sun, 28 Jan 2024 20:06:07 +0800 Subject: [PATCH 3/6] =?UTF-8?q?:wrench:=20=E4=BF=AE=E6=94=B9=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6=EF=BC=8C=20nacos=20=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=BA=90=E9=93=BE=E6=8E=A5=E8=B6=85=E6=97=B6=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pig-register/src/main/resources/application.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pig-register/src/main/resources/application.yml b/pig-register/src/main/resources/application.yml index 46125f56..0ca42a53 100644 --- a/pig-register/src/main/resources/application.yml +++ b/pig-register/src/main/resources/application.yml @@ -11,7 +11,10 @@ db: password: ${MYSQL_PWD:root} url: 0: jdbc:mysql://${MYSQL_HOST:pig-mysql}:${MYSQL_PORT:3306}/${MYSQL_DB:pig_config}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true - + pool: + config: + connectionTimeout: 30000 + validationTimeout: 10000 nacos: core: From b14411f967eca469c6ac8dcfa7dbd649adbda5c1 Mon Sep 17 00:00:00 2001 From: lbw Date: Sun, 28 Jan 2024 20:25:43 +0800 Subject: [PATCH 4/6] :bookmark: Releasing 3.7.4 --- pig-auth/pom.xml | 2 +- pig-common/pig-common-bom/pom.xml | 4 ++-- pig-common/pig-common-core/pom.xml | 2 +- pig-common/pig-common-datasource/pom.xml | 2 +- pig-common/pig-common-feign/pom.xml | 2 +- pig-common/pig-common-job/pom.xml | 2 +- pig-common/pig-common-log/pom.xml | 2 +- pig-common/pig-common-mybatis/pom.xml | 2 +- pig-common/pig-common-oss/pom.xml | 2 +- pig-common/pig-common-seata/pom.xml | 2 +- pig-common/pig-common-security/pom.xml | 2 +- pig-common/pig-common-swagger/pom.xml | 2 +- pig-common/pig-common-xss/pom.xml | 2 +- pig-common/pom.xml | 2 +- pig-gateway/pom.xml | 2 +- pig-register/pom.xml | 2 +- pig-upms/pig-upms-api/pom.xml | 2 +- pig-upms/pig-upms-biz/pom.xml | 2 +- pig-upms/pom.xml | 2 +- pig-visual/pig-codegen/pom.xml | 2 +- pig-visual/pig-monitor/pom.xml | 2 +- pig-visual/pig-quartz/pom.xml | 2 +- pig-visual/pom.xml | 2 +- pom.xml | 2 +- 24 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pig-auth/pom.xml b/pig-auth/pom.xml index 262f163e..3e6a206b 100755 --- a/pig-auth/pom.xml +++ b/pig-auth/pom.xml @@ -21,7 +21,7 @@ com.pig4cloud pig - 3.7.1-JDK8 + 3.7.4-JDK8 pig-auth diff --git a/pig-common/pig-common-bom/pom.xml b/pig-common/pig-common-bom/pom.xml index 161680f3..c7d8d1ff 100644 --- a/pig-common/pig-common-bom/pom.xml +++ b/pig-common/pig-common-bom/pom.xml @@ -6,7 +6,7 @@ com.pig4cloud pig-common-bom - 3.7.1-JDK8 + 3.7.4-JDK8 pom pig-common-bom @@ -27,7 +27,7 @@ 1.6.9 2.2.0 3.5.5 - 4.2.0 + 4.3.0 8.0.33 1.6.1 1.2.6 diff --git a/pig-common/pig-common-core/pom.xml b/pig-common/pig-common-core/pom.xml index 144bc6a5..e4b559c4 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 - 3.7.1-JDK8 + 3.7.4-JDK8 pig-common-core diff --git a/pig-common/pig-common-datasource/pom.xml b/pig-common/pig-common-datasource/pom.xml index 74c47e48..d3583158 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 - 3.7.1-JDK8 + 3.7.4-JDK8 4.0.0 diff --git a/pig-common/pig-common-feign/pom.xml b/pig-common/pig-common-feign/pom.xml index 418fe7d1..c0b6a7ff 100755 --- a/pig-common/pig-common-feign/pom.xml +++ b/pig-common/pig-common-feign/pom.xml @@ -21,7 +21,7 @@ com.pig4cloud pig-common - 3.7.1-JDK8 + 3.7.4-JDK8 4.0.0 diff --git a/pig-common/pig-common-job/pom.xml b/pig-common/pig-common-job/pom.xml index 3953de84..70df103c 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 - 3.7.1-JDK8 + 3.7.4-JDK8 pig-common-job diff --git a/pig-common/pig-common-log/pom.xml b/pig-common/pig-common-log/pom.xml index 5ed0abc2..01273e60 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 - 3.7.1-JDK8 + 3.7.4-JDK8 pig-common-log diff --git a/pig-common/pig-common-mybatis/pom.xml b/pig-common/pig-common-mybatis/pom.xml index 628f38e0..f4d9e9a6 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 - 3.7.1-JDK8 + 3.7.4-JDK8 pig-common-mybatis diff --git a/pig-common/pig-common-oss/pom.xml b/pig-common/pig-common-oss/pom.xml index 15bdd088..351057b1 100755 --- a/pig-common/pig-common-oss/pom.xml +++ b/pig-common/pig-common-oss/pom.xml @@ -6,7 +6,7 @@ com.pig4cloud pig-common - 3.7.1-JDK8 + 3.7.4-JDK8 pig-common-oss diff --git a/pig-common/pig-common-seata/pom.xml b/pig-common/pig-common-seata/pom.xml index 541b62cc..d907156d 100755 --- a/pig-common/pig-common-seata/pom.xml +++ b/pig-common/pig-common-seata/pom.xml @@ -23,7 +23,7 @@ com.pig4cloud pig-common - 3.7.1-JDK8 + 3.7.4-JDK8 pig-common-seata diff --git a/pig-common/pig-common-security/pom.xml b/pig-common/pig-common-security/pom.xml index a791e7cf..01580020 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 - 3.7.1-JDK8 + 3.7.4-JDK8 pig-common-security diff --git a/pig-common/pig-common-swagger/pom.xml b/pig-common/pig-common-swagger/pom.xml index 8e5093f8..0628e1ac 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 - 3.7.1-JDK8 + 3.7.4-JDK8 pig-common-swagger diff --git a/pig-common/pig-common-xss/pom.xml b/pig-common/pig-common-xss/pom.xml index 1c347017..771a2bc4 100755 --- a/pig-common/pig-common-xss/pom.xml +++ b/pig-common/pig-common-xss/pom.xml @@ -6,7 +6,7 @@ com.pig4cloud pig-common - 3.7.1-JDK8 + 3.7.4-JDK8 pig-common-xss diff --git a/pig-common/pom.xml b/pig-common/pom.xml index 2e98cff8..062d1f90 100755 --- a/pig-common/pom.xml +++ b/pig-common/pom.xml @@ -21,7 +21,7 @@ com.pig4cloud pig - 3.7.1-JDK8 + 3.7.4-JDK8 pig-common diff --git a/pig-gateway/pom.xml b/pig-gateway/pom.xml index 035730cf..3c59f609 100755 --- a/pig-gateway/pom.xml +++ b/pig-gateway/pom.xml @@ -21,7 +21,7 @@ com.pig4cloud pig - 3.7.1-JDK8 + 3.7.4-JDK8 pig-gateway diff --git a/pig-register/pom.xml b/pig-register/pom.xml index 44e803cf..bbaacd61 100644 --- a/pig-register/pom.xml +++ b/pig-register/pom.xml @@ -18,7 +18,7 @@ com.pig4cloud pig - 3.7.1-JDK8 + 3.7.4-JDK8 pig-register diff --git a/pig-upms/pig-upms-api/pom.xml b/pig-upms/pig-upms-api/pom.xml index a2624335..ec371fc7 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 - 3.7.1-JDK8 + 3.7.4-JDK8 pig-upms-api diff --git a/pig-upms/pig-upms-biz/pom.xml b/pig-upms/pig-upms-biz/pom.xml index 44529025..7909652d 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 - 3.7.1-JDK8 + 3.7.4-JDK8 pig-upms-biz diff --git a/pig-upms/pom.xml b/pig-upms/pom.xml index 0bfc36a3..5bb57518 100755 --- a/pig-upms/pom.xml +++ b/pig-upms/pom.xml @@ -21,7 +21,7 @@ com.pig4cloud pig - 3.7.1-JDK8 + 3.7.4-JDK8 pig-upms diff --git a/pig-visual/pig-codegen/pom.xml b/pig-visual/pig-codegen/pom.xml index 961331e1..8c3d78d1 100755 --- a/pig-visual/pig-codegen/pom.xml +++ b/pig-visual/pig-codegen/pom.xml @@ -22,7 +22,7 @@ com.pig4cloud pig-visual - 3.7.1-JDK8 + 3.7.4-JDK8 pig-codegen diff --git a/pig-visual/pig-monitor/pom.xml b/pig-visual/pig-monitor/pom.xml index 57596cf0..d56244e4 100755 --- a/pig-visual/pig-monitor/pom.xml +++ b/pig-visual/pig-monitor/pom.xml @@ -21,7 +21,7 @@ com.pig4cloud pig-visual - 3.7.1-JDK8 + 3.7.4-JDK8 pig-monitor diff --git a/pig-visual/pig-quartz/pom.xml b/pig-visual/pig-quartz/pom.xml index 3619b0f8..728babc9 100644 --- a/pig-visual/pig-quartz/pom.xml +++ b/pig-visual/pig-quartz/pom.xml @@ -5,7 +5,7 @@ com.pig4cloud pig-visual - 3.7.1-JDK8 + 3.7.4-JDK8 4.0.0 diff --git a/pig-visual/pom.xml b/pig-visual/pom.xml index 3897635a..4d3abddb 100755 --- a/pig-visual/pom.xml +++ b/pig-visual/pom.xml @@ -21,7 +21,7 @@ com.pig4cloud pig - 3.7.1-JDK8 + 3.7.4-JDK8 pig-visual diff --git a/pom.xml b/pom.xml index b0d71270..623c88bf 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ com.pig4cloud pig ${project.artifactId} - 3.7.1-JDK8 + 3.7.4-JDK8 pom https://www.pig4cloud.com From cb94ea52ce7b04e2346c6ed622da875ffd3966fd Mon Sep 17 00:00:00 2001 From: lbw Date: Sun, 28 Jan 2024 21:39:35 +0800 Subject: [PATCH 5/6] :bookmark: Releasing / Version tags. 3.7.4 --- .gitignore | 1 + pig-auth/pom.xml | 2 +- pig-common/pig-common-bom/pom.xml | 59 +++++++++++++++++------- pig-common/pig-common-core/pom.xml | 2 +- pig-common/pig-common-datasource/pom.xml | 2 +- pig-common/pig-common-feign/pom.xml | 2 +- pig-common/pig-common-job/pom.xml | 2 +- pig-common/pig-common-log/pom.xml | 2 +- pig-common/pig-common-mybatis/pom.xml | 2 +- pig-common/pig-common-oss/pom.xml | 2 +- pig-common/pig-common-seata/pom.xml | 2 +- pig-common/pig-common-security/pom.xml | 2 +- pig-common/pig-common-swagger/pom.xml | 2 +- pig-common/pig-common-xss/pom.xml | 2 +- pig-common/pom.xml | 2 +- pig-gateway/pom.xml | 2 +- pig-register/pom.xml | 2 +- pig-upms/pig-upms-api/pom.xml | 2 +- pig-upms/pig-upms-biz/pom.xml | 2 +- pig-upms/pom.xml | 2 +- pig-visual/pig-codegen/pom.xml | 2 +- pig-visual/pig-monitor/pom.xml | 2 +- pig-visual/pig-quartz/pom.xml | 2 +- pig-visual/pom.xml | 2 +- pom.xml | 31 ++++++++++++- 25 files changed, 96 insertions(+), 39 deletions(-) diff --git a/.gitignore b/.gitignore index 877ad0ba..a3e921c8 100755 --- a/.gitignore +++ b/.gitignore @@ -57,3 +57,4 @@ target/ Thumbs.db Servers .metadata +.flattened-pom.xml diff --git a/pig-auth/pom.xml b/pig-auth/pom.xml index 3e6a206b..9f4c1b22 100755 --- a/pig-auth/pom.xml +++ b/pig-auth/pom.xml @@ -21,7 +21,7 @@ com.pig4cloud pig - 3.7.4-JDK8 + ${revision} pig-auth diff --git a/pig-common/pig-common-bom/pom.xml b/pig-common/pig-common-bom/pom.xml index c7d8d1ff..7ab89093 100644 --- a/pig-common/pig-common-bom/pom.xml +++ b/pig-common/pig-common-bom/pom.xml @@ -6,7 +6,7 @@ com.pig4cloud pig-common-bom - 3.7.4-JDK8 + ${revision} pom pig-common-bom @@ -14,14 +14,12 @@ pig cloud parent - ${project.version} + 3.7.4-JDK8 2.7.18 UTF-8 2.17.1 1.8 1.8 - 4.9.9 - 0.0.39 1.2.83 3.0.3 1.6.9 @@ -39,6 +37,9 @@ 5.8.23 2.7.4 1.8.4 + 4.9.9 + 1.6.0 + 0.0.39 @@ -47,62 +48,62 @@ com.pig4cloud pig-common-core - ${pig.common.version} + ${revision} com.pig4cloud pig-common-datasource - ${pig.common.version} + ${revision} com.pig4cloud pig-common-job - ${pig.common.version} + ${revision} com.pig4cloud pig-common-log - ${pig.common.version} + ${revision} com.pig4cloud pig-common-mybatis - ${pig.common.version} + ${revision} com.pig4cloud pig-common-security - ${pig.common.version} + ${revision} com.pig4cloud pig-common-feign - ${pig.common.version} + ${revision} com.pig4cloud pig-common-swagger - ${pig.common.version} + ${revision} com.pig4cloud pig-common-seata - ${pig.common.version} + ${revision} com.pig4cloud pig-common-xss - ${pig.common.version} + ${revision} com.pig4cloud pig-common-oss - ${pig.common.version} + ${revision} com.pig4cloud pig-upms-api - ${pig.common.version} + ${revision} com.mysql @@ -228,6 +229,32 @@ + + + org.codehaus.mojo + flatten-maven-plugin + ${flatten-maven-plugin.version} + + resolveCiFriendliesOnly + true + + + + flatten + process-resources + + flatten + + + + flatten.clean + clean + + clean + + + + io.github.git-commit-id diff --git a/pig-common/pig-common-core/pom.xml b/pig-common/pig-common-core/pom.xml index e4b559c4..bd13b0ab 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 - 3.7.4-JDK8 + ${revision} pig-common-core diff --git a/pig-common/pig-common-datasource/pom.xml b/pig-common/pig-common-datasource/pom.xml index d3583158..305cef49 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 - 3.7.4-JDK8 + ${revision} 4.0.0 diff --git a/pig-common/pig-common-feign/pom.xml b/pig-common/pig-common-feign/pom.xml index c0b6a7ff..ac444375 100755 --- a/pig-common/pig-common-feign/pom.xml +++ b/pig-common/pig-common-feign/pom.xml @@ -21,7 +21,7 @@ com.pig4cloud pig-common - 3.7.4-JDK8 + ${revision} 4.0.0 diff --git a/pig-common/pig-common-job/pom.xml b/pig-common/pig-common-job/pom.xml index 70df103c..06776287 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 - 3.7.4-JDK8 + ${revision} pig-common-job diff --git a/pig-common/pig-common-log/pom.xml b/pig-common/pig-common-log/pom.xml index 01273e60..8a94a9aa 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 - 3.7.4-JDK8 + ${revision} pig-common-log diff --git a/pig-common/pig-common-mybatis/pom.xml b/pig-common/pig-common-mybatis/pom.xml index f4d9e9a6..fb74400f 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 - 3.7.4-JDK8 + ${revision} pig-common-mybatis diff --git a/pig-common/pig-common-oss/pom.xml b/pig-common/pig-common-oss/pom.xml index 351057b1..cfd10cf1 100755 --- a/pig-common/pig-common-oss/pom.xml +++ b/pig-common/pig-common-oss/pom.xml @@ -6,7 +6,7 @@ com.pig4cloud pig-common - 3.7.4-JDK8 + ${revision} pig-common-oss diff --git a/pig-common/pig-common-seata/pom.xml b/pig-common/pig-common-seata/pom.xml index d907156d..d809f966 100755 --- a/pig-common/pig-common-seata/pom.xml +++ b/pig-common/pig-common-seata/pom.xml @@ -23,7 +23,7 @@ com.pig4cloud pig-common - 3.7.4-JDK8 + ${revision} pig-common-seata diff --git a/pig-common/pig-common-security/pom.xml b/pig-common/pig-common-security/pom.xml index 01580020..56ef74cb 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 - 3.7.4-JDK8 + ${revision} pig-common-security diff --git a/pig-common/pig-common-swagger/pom.xml b/pig-common/pig-common-swagger/pom.xml index 0628e1ac..e3974c73 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 - 3.7.4-JDK8 + ${revision} pig-common-swagger diff --git a/pig-common/pig-common-xss/pom.xml b/pig-common/pig-common-xss/pom.xml index 771a2bc4..f391aaa0 100755 --- a/pig-common/pig-common-xss/pom.xml +++ b/pig-common/pig-common-xss/pom.xml @@ -6,7 +6,7 @@ com.pig4cloud pig-common - 3.7.4-JDK8 + ${revision} pig-common-xss diff --git a/pig-common/pom.xml b/pig-common/pom.xml index 062d1f90..42af275b 100755 --- a/pig-common/pom.xml +++ b/pig-common/pom.xml @@ -21,7 +21,7 @@ com.pig4cloud pig - 3.7.4-JDK8 + ${revision} pig-common diff --git a/pig-gateway/pom.xml b/pig-gateway/pom.xml index 3c59f609..14ea1f90 100755 --- a/pig-gateway/pom.xml +++ b/pig-gateway/pom.xml @@ -21,7 +21,7 @@ com.pig4cloud pig - 3.7.4-JDK8 + ${revision} pig-gateway diff --git a/pig-register/pom.xml b/pig-register/pom.xml index bbaacd61..b11b8b1b 100644 --- a/pig-register/pom.xml +++ b/pig-register/pom.xml @@ -18,7 +18,7 @@ com.pig4cloud pig - 3.7.4-JDK8 + ${revision} pig-register diff --git a/pig-upms/pig-upms-api/pom.xml b/pig-upms/pig-upms-api/pom.xml index ec371fc7..0af724eb 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 - 3.7.4-JDK8 + ${revision} pig-upms-api diff --git a/pig-upms/pig-upms-biz/pom.xml b/pig-upms/pig-upms-biz/pom.xml index 7909652d..889d22a3 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 - 3.7.4-JDK8 + ${revision} pig-upms-biz diff --git a/pig-upms/pom.xml b/pig-upms/pom.xml index 5bb57518..143c2981 100755 --- a/pig-upms/pom.xml +++ b/pig-upms/pom.xml @@ -21,7 +21,7 @@ com.pig4cloud pig - 3.7.4-JDK8 + ${revision} pig-upms diff --git a/pig-visual/pig-codegen/pom.xml b/pig-visual/pig-codegen/pom.xml index 8c3d78d1..c2f11c7e 100755 --- a/pig-visual/pig-codegen/pom.xml +++ b/pig-visual/pig-codegen/pom.xml @@ -22,7 +22,7 @@ com.pig4cloud pig-visual - 3.7.4-JDK8 + ${revision} pig-codegen diff --git a/pig-visual/pig-monitor/pom.xml b/pig-visual/pig-monitor/pom.xml index d56244e4..3bff4d0e 100755 --- a/pig-visual/pig-monitor/pom.xml +++ b/pig-visual/pig-monitor/pom.xml @@ -21,7 +21,7 @@ com.pig4cloud pig-visual - 3.7.4-JDK8 + ${revision} pig-monitor diff --git a/pig-visual/pig-quartz/pom.xml b/pig-visual/pig-quartz/pom.xml index 728babc9..eb145622 100644 --- a/pig-visual/pig-quartz/pom.xml +++ b/pig-visual/pig-quartz/pom.xml @@ -5,7 +5,7 @@ com.pig4cloud pig-visual - 3.7.4-JDK8 + ${revision} 4.0.0 diff --git a/pig-visual/pom.xml b/pig-visual/pom.xml index 4d3abddb..e51bb4c6 100755 --- a/pig-visual/pom.xml +++ b/pig-visual/pom.xml @@ -21,7 +21,7 @@ com.pig4cloud pig - 3.7.4-JDK8 + ${revision} pig-visual diff --git a/pom.xml b/pom.xml index 623c88bf..a8023fa3 100644 --- a/pom.xml +++ b/pom.xml @@ -22,11 +22,13 @@ com.pig4cloud pig ${project.artifactId} - 3.7.4-JDK8 + ${revision} pom https://www.pig4cloud.com + + 3.7.4-JDK8 2.7.18 2021.0.8 2021.0.5.0 @@ -53,6 +55,7 @@ password 4.9.9 0.0.39 + 1.6.0 @@ -199,6 +202,32 @@ + + + org.codehaus.mojo + flatten-maven-plugin + ${flatten-maven-plugin.version} + + resolveCiFriendliesOnly + true + + + + flatten + process-resources + + flatten + + + + flatten.clean + clean + + clean + + + + io.github.git-commit-id From 47a7e7a7c13f599a61cb3a8bc82810f56ef1199a Mon Sep 17 00:00:00 2001 From: lbw Date: Sun, 28 Jan 2024 21:47:39 +0800 Subject: [PATCH 6/6] :bookmark: Releasing / Version tags. 3.7.4 --- .github/workflows/mirror.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml index 31cfa186..112d4506 100644 --- a/.github/workflows/mirror.yml +++ b/.github/workflows/mirror.yml @@ -14,12 +14,3 @@ jobs: with: source-repo: "git@github.com:pig-mesh/pig.git" destination-repo: "git@code.gitlink.org.cn:lengleng/pig.git" - atomgit: - runs-on: ubuntu-latest - steps: - - uses: wearerequired/git-mirror-action@master #同步至 atomgit - env: - SSH_PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} - with: - source-repo: "git@github.com:pig-mesh/pig.git" - destination-repo: "git@atomgit.com:log4j/pig.git"