diff --git a/.gitee/ISSUE_TEMPLATE.zh-CN.md b/.gitee/ISSUE_TEMPLATE.zh-CN.md index 2ed7b061..7e8bc1d3 100644 --- a/.gitee/ISSUE_TEMPLATE.zh-CN.md +++ b/.gitee/ISSUE_TEMPLATE.zh-CN.md @@ -1,4 +1,7 @@ +[pigx 相关问题请去此提,码云忽略](https://git.pig4cloud.com/pig/pigx/issues) + ### 版本信息 + - pig版本: - 是否修改包名: diff --git a/pig-auth/pom.xml b/pig-auth/pom.xml index 9cc0a044..db553635 100755 --- a/pig-auth/pom.xml +++ b/pig-auth/pom.xml @@ -23,7 +23,7 @@ com.pig4cloud pig - 2.7.0 + 2.7.1 pig-auth @@ -46,13 +46,13 @@ com.pig4cloud pig-upms-api - 2.7.0 + 2.7.1 com.pig4cloud pig-common-security - 2.7.0 + 2.7.1 diff --git a/pig-codegen/pom.xml b/pig-codegen/pom.xml index d1b0f95b..136df790 100755 --- a/pig-codegen/pom.xml +++ b/pig-codegen/pom.xml @@ -24,7 +24,7 @@ com.pig4cloud pig - 2.7.0 + 2.7.1 pig-codegen @@ -37,7 +37,7 @@ com.pig4cloud pig-common-swagger - 2.7.0 + 2.7.1 @@ -53,30 +53,30 @@ com.pig4cloud pig-common-datasource - 2.7.0 + 2.7.1 com.pig4cloud pig-common-mybatis - 2.7.0 + 2.7.1 com.pig4cloud pig-common-core - 2.7.0 + 2.7.1 com.pig4cloud pig-common-log - 2.7.0 + 2.7.1 com.pig4cloud pig-common-security - 2.7.0 + 2.7.1 diff --git a/pig-common/pig-common-core/pom.xml b/pig-common/pig-common-core/pom.xml index cee4996d..faf17d4a 100755 --- a/pig-common/pig-common-core/pom.xml +++ b/pig-common/pig-common-core/pom.xml @@ -23,7 +23,7 @@ com.pig4cloud pig-common - 2.7.0 + 2.7.1 pig-common-core diff --git a/pig-common/pig-common-datasource/pom.xml b/pig-common/pig-common-datasource/pom.xml index 6b94aaa9..7b4de839 100644 --- a/pig-common/pig-common-datasource/pom.xml +++ b/pig-common/pig-common-datasource/pom.xml @@ -23,7 +23,7 @@ pig-common com.pig4cloud - 2.7.0 + 2.7.1 4.0.0 diff --git a/pig-common/pig-common-log/pom.xml b/pig-common/pig-common-log/pom.xml index 359c0cdd..ff2410e9 100755 --- a/pig-common/pig-common-log/pom.xml +++ b/pig-common/pig-common-log/pom.xml @@ -23,7 +23,7 @@ com.pig4cloud pig-common - 2.7.0 + 2.7.1 pig-common-log @@ -37,13 +37,13 @@ com.pig4cloud pig-common-core - 2.7.0 + 2.7.1 com.pig4cloud pig-upms-api - 2.7.0 + 2.7.1 diff --git a/pig-common/pig-common-mybatis/pom.xml b/pig-common/pig-common-mybatis/pom.xml index 6cc51b7c..321805d4 100755 --- a/pig-common/pig-common-mybatis/pom.xml +++ b/pig-common/pig-common-mybatis/pom.xml @@ -23,7 +23,7 @@ com.pig4cloud pig-common - 2.7.0 + 2.7.1 pig-common-mybatis diff --git a/pig-common/pig-common-security/pom.xml b/pig-common/pig-common-security/pom.xml index f2706ba4..8d1aa96d 100755 --- a/pig-common/pig-common-security/pom.xml +++ b/pig-common/pig-common-security/pom.xml @@ -23,7 +23,7 @@ com.pig4cloud pig-common - 2.7.0 + 2.7.1 pig-common-security @@ -37,7 +37,7 @@ com.pig4cloud pig-common-core - 2.7.0 + 2.7.1 @@ -52,7 +52,7 @@ com.pig4cloud pig-upms-api - 2.7.0 + 2.7.1 diff --git a/pig-common/pig-common-swagger/pom.xml b/pig-common/pig-common-swagger/pom.xml index 79bc8953..82fa5d89 100644 --- a/pig-common/pig-common-swagger/pom.xml +++ b/pig-common/pig-common-swagger/pom.xml @@ -23,7 +23,7 @@ com.pig4cloud pig-common - 2.7.0 + 2.7.1 pig-common-swagger diff --git a/pig-common/pom.xml b/pig-common/pom.xml index d387f451..a2b1859a 100755 --- a/pig-common/pom.xml +++ b/pig-common/pom.xml @@ -23,7 +23,7 @@ com.pig4cloud pig - 2.7.0 + 2.7.1 pig-common diff --git a/pig-gateway/pom.xml b/pig-gateway/pom.xml index ce487aeb..a6248fdb 100755 --- a/pig-gateway/pom.xml +++ b/pig-gateway/pom.xml @@ -23,7 +23,7 @@ com.pig4cloud pig - 2.7.0 + 2.7.1 pig-gateway @@ -61,7 +61,7 @@ com.pig4cloud pig-common-core - 2.7.0 + 2.7.1 diff --git a/pig-monitor/pom.xml b/pig-monitor/pom.xml index d9161002..bf1e86ec 100755 --- a/pig-monitor/pom.xml +++ b/pig-monitor/pom.xml @@ -23,7 +23,7 @@ com.pig4cloud pig - 2.7.0 + 2.7.1 pig-monitor diff --git a/pig-register/pom.xml b/pig-register/pom.xml index 205f3a14..e2f1209b 100755 --- a/pig-register/pom.xml +++ b/pig-register/pom.xml @@ -24,7 +24,7 @@ com.pig4cloud pig - 2.7.0 + 2.7.1 pig-register diff --git a/pig-register/src/main/java/com/alibaba/nacos/console/config/WebSecurityConfig.java b/pig-register/src/main/java/com/alibaba/nacos/console/config/WebSecurityConfig.java index 1ef0eaff..503734c1 100755 --- a/pig-register/src/main/java/com/alibaba/nacos/console/config/WebSecurityConfig.java +++ b/pig-register/src/main/java/com/alibaba/nacos/console/config/WebSecurityConfig.java @@ -75,9 +75,9 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter { @Override public void configure(WebSecurity web) { - String ignoreURLs = env.getProperty("nacos.security.ignore.urls", "/**"); - for (String ignoreURL : ignoreURLs.trim().split(SECURITY_IGNORE_URLS_SPILT_CHAR)) { - web.ignoring().antMatchers(ignoreURL.trim()); + String ignoreUrls = env.getProperty("nacos.security.ignore.urls", "/**"); + for (String url : ignoreUrls.trim().split(SECURITY_IGNORE_URLS_SPILT_CHAR)) { + web.ignoring().antMatchers(url.trim()); } } diff --git a/pig-register/src/main/java/com/alibaba/nacos/console/utils/JwtTokenUtils.java b/pig-register/src/main/java/com/alibaba/nacos/console/utils/JwtTokenUtils.java index 1057d462..730eb7a6 100755 --- a/pig-register/src/main/java/com/alibaba/nacos/console/utils/JwtTokenUtils.java +++ b/pig-register/src/main/java/com/alibaba/nacos/console/utils/JwtTokenUtils.java @@ -38,102 +38,90 @@ import java.util.List; @Component public class JwtTokenUtils { - private final Logger log = LoggerFactory.getLogger(JwtTokenUtils.class); + private final Logger log = LoggerFactory.getLogger(JwtTokenUtils.class); - private static final String AUTHORITIES_KEY = "auth"; + private static final String AUTHORITIES_KEY = "auth"; - /** - * secret key - */ - private String secretKey; + /** + * secret key + */ + private String secretKey; - /** - * Token validity time(ms) - */ - private long tokenValidityInMilliseconds; + /** + * Token validity time(ms) + */ + private long tokenValidityInMilliseconds; - @PostConstruct - public void init() { - this.secretKey = "SecretKey012345678901234567890123456789012345678901234567890123456789"; - this.tokenValidityInMilliseconds = 1000 * 60 * 30L; - } + @PostConstruct + public void init() { + this.secretKey = "SecretKey012345678901234567890123456789012345678901234567890123456789"; + this.tokenValidityInMilliseconds = 1000 * 60 * 30L; + } - /** - * Create token - * - * @param authentication auth info - * @return token - */ - public String createToken(Authentication authentication) { - /** - * Current time - */ - long now = (new Date()).getTime(); - /** - * Validity date - */ - Date validity; - validity = new Date(now + this.tokenValidityInMilliseconds); + /** + * Create token + * + * @param authentication auth info + * @return token + */ + public String createToken(Authentication authentication) { + /** + * Current time + */ + long now = (new Date()).getTime(); + /** + * Validity date + */ + Date validity; + validity = new Date(now + this.tokenValidityInMilliseconds); - /** - * create token - */ - return Jwts.builder() - .setSubject(authentication.getName()) - .claim(AUTHORITIES_KEY, "") - .setExpiration(validity) - .signWith(SignatureAlgorithm.HS256, secretKey) - .compact(); - } + /** + * create token + */ + return Jwts.builder() + .setSubject(authentication.getName()) + .claim(AUTHORITIES_KEY, "") + .setExpiration(validity) + .signWith(SignatureAlgorithm.HS256, secretKey) + .compact(); + } - /** - * Get auth Info - * - * @param token token - * @return auth info - */ - public Authentication getAuthentication(String token) { - /** - * parse the payload of token - */ - Claims claims = Jwts.parser() - .setSigningKey(secretKey) - .parseClaimsJws(token) - .getBody(); + /** + * Get auth Info + * + * @param token token + * @return auth info + */ + public Authentication getAuthentication(String token) { + /** + * parse the payload of token + */ + Claims claims = Jwts.parser() + .setSigningKey(secretKey) + .parseClaimsJws(token) + .getBody(); - List authorities = AuthorityUtils.commaSeparatedStringToAuthorityList((String) claims.get(AUTHORITIES_KEY)); + List authorities = AuthorityUtils.commaSeparatedStringToAuthorityList((String) claims.get(AUTHORITIES_KEY)); - User principal = new User(claims.getSubject(), "", authorities); - return new UsernamePasswordAuthenticationToken(principal, "", authorities); - } + User principal = new User(claims.getSubject(), "", authorities); + return new UsernamePasswordAuthenticationToken(principal, "", authorities); + } - /** - * validate token - * - * @param token token - * @return whether valid - */ - public boolean validateToken(String token) { - try { - Jwts.parser().setSigningKey(secretKey).parseClaimsJws(token); - return true; - } catch (SignatureException e) { - log.info("Invalid JWT signature."); - log.trace("Invalid JWT signature trace: {}", e); - } catch (MalformedJwtException e) { - log.info("Invalid JWT token."); - log.trace("Invalid JWT token trace: {}", e); - } catch (ExpiredJwtException e) { - log.info("Expired JWT token."); - log.trace("Expired JWT token trace: {}", e); - } catch (UnsupportedJwtException e) { - log.info("Unsupported JWT token."); - log.trace("Unsupported JWT token trace: {}", e); - } catch (IllegalArgumentException e) { - log.info("JWT token compact of handler are invalid."); - log.trace("JWT token compact of handler are invalid trace: {}", e); - } - return false; - } + /** + * validate token + * + * @param token token + * @return whether valid + */ + public boolean validateToken(String token) { + try { + Jwts.parser().setSigningKey(secretKey).parseClaimsJws(token); + return true; + } catch (Exception e) { + log.info("Invalid JWT signature."); + log.trace("Invalid JWT signature trace: {}", e); + } + return false; + } } diff --git a/pig-upms/pig-upms-api/pom.xml b/pig-upms/pig-upms-api/pom.xml index e9927f77..2f90a024 100755 --- a/pig-upms/pig-upms-api/pom.xml +++ b/pig-upms/pig-upms-api/pom.xml @@ -23,7 +23,7 @@ com.pig4cloud pig-upms - 2.7.0 + 2.7.1 pig-upms-api @@ -37,7 +37,7 @@ com.pig4cloud pig-common-core - 2.7.0 + 2.7.1 diff --git a/pig-upms/pig-upms-biz/pom.xml b/pig-upms/pig-upms-biz/pom.xml index 3e146179..fe7fa0c9 100644 --- a/pig-upms/pig-upms-biz/pom.xml +++ b/pig-upms/pig-upms-biz/pom.xml @@ -23,7 +23,7 @@ com.pig4cloud pig-upms - 2.7.0 + 2.7.1 pig-upms-biz @@ -36,31 +36,31 @@ com.pig4cloud pig-upms-api - 2.7.0 + 2.7.1 com.pig4cloud pig-common-security - 2.7.0 + 2.7.1 com.pig4cloud pig-common-log - 2.7.0 + 2.7.1 com.pig4cloud pig-common-swagger - 2.7.0 + 2.7.1 com.pig4cloud pig-common-mybatis - 2.7.0 + 2.7.1 diff --git a/pig-upms/pom.xml b/pig-upms/pom.xml index 4196667f..08f02091 100755 --- a/pig-upms/pom.xml +++ b/pig-upms/pom.xml @@ -23,7 +23,7 @@ com.pig4cloud pig - 2.7.0 + 2.7.1 pig-upms diff --git a/pom.xml b/pom.xml index 7bc7d87d..2ec299b8 100755 --- a/pom.xml +++ b/pom.xml @@ -29,7 +29,7 @@ com.pig4cloud pig - 2.7.0 + 2.7.1 ${project.artifactId} pom https://www.pig4cloud.com