From 703ca65a8fc8c27d983001d09db500fa80aba1c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B7=E5=86=B7?= Date: Thu, 24 Jan 2019 14:55:41 +0800 Subject: [PATCH] :bookmark: Releasing / Version tags. 1.3.2 --- pig-auth/pom.xml | 6 ++--- .../auth/config/PigAuthorizationConfig.java | 6 +++-- .../config/PigSecurityConfigurerAdapter.java | 10 +++++++ pig-common/pom.xml | 4 +-- pig-config/pom.xml | 4 +-- pig-eureka/pom.xml | 4 +-- pig-gateway/pom.xml | 6 ++--- pig-modules/pig-daemon-service/pom.xml | 6 ++--- pig-modules/pig-mc-service/pom.xml | 6 ++--- pig-modules/pig-sso-client-demo/pom.xml | 4 +-- pig-modules/pig-upms-service/pom.xml | 6 ++--- pig-modules/pom.xml | 4 +-- pig-visual/pig-monitor/pom.xml | 6 ++--- .../pig/monitor/PigMonitorApplication.java | 26 ------------------- .../config/PigNotifierConfiguration.java | 10 ++++--- pig-visual/pig-zipkin-db/pom.xml | 6 ++--- pig-visual/pig-zipkin-elk/pom.xml | 6 ++--- pig-visual/pom.xml | 4 +-- pom.xml | 2 +- 19 files changed, 58 insertions(+), 68 deletions(-) diff --git a/pig-auth/pom.xml b/pig-auth/pom.xml index 4e625fde..0ede6322 100644 --- a/pig-auth/pom.xml +++ b/pig-auth/pom.xml @@ -22,7 +22,7 @@ com.github.pig pig-auth - 1.3.1 + 1.3.2 jar pig-auth @@ -31,14 +31,14 @@ com.github pig - 1.3.1 + 1.3.2 com.github.pig pig-common - 1.3.1 + 1.3.2 diff --git a/pig-auth/src/main/java/com/github/pig/auth/config/PigAuthorizationConfig.java b/pig-auth/src/main/java/com/github/pig/auth/config/PigAuthorizationConfig.java index 733b1ac8..84e3b421 100644 --- a/pig-auth/src/main/java/com/github/pig/auth/config/PigAuthorizationConfig.java +++ b/pig-auth/src/main/java/com/github/pig/auth/config/PigAuthorizationConfig.java @@ -21,6 +21,7 @@ import com.github.pig.auth.util.UserDetailsImpl; import com.github.pig.common.constant.CommonConstant; import com.github.pig.common.constant.SecurityConstants; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.annotation.Order; @@ -61,7 +62,8 @@ public class PigAuthorizationConfig extends AuthorizationServerConfigurerAdapter private DataSource dataSource; @Autowired - private AuthenticationManager authenticationManager; + @Qualifier("authenticationManagerBean") + private AuthenticationManager authenticationManagerBean; @Autowired private UserDetailsService userDetailsService; @@ -87,7 +89,7 @@ public class PigAuthorizationConfig extends AuthorizationServerConfigurerAdapter endpoints .tokenStore(redisTokenStore()) .tokenEnhancer(tokenEnhancerChain) - .authenticationManager(authenticationManager) + .authenticationManager(authenticationManagerBean) .reuseRefreshTokens(false) .userDetailsService(userDetailsService); } diff --git a/pig-auth/src/main/java/com/github/pig/auth/config/PigSecurityConfigurerAdapter.java b/pig-auth/src/main/java/com/github/pig/auth/config/PigSecurityConfigurerAdapter.java index a7294333..52d11a03 100644 --- a/pig-auth/src/main/java/com/github/pig/auth/config/PigSecurityConfigurerAdapter.java +++ b/pig-auth/src/main/java/com/github/pig/auth/config/PigSecurityConfigurerAdapter.java @@ -19,10 +19,13 @@ package com.github.pig.auth.config; import com.github.pig.auth.component.mobile.MobileSecurityConfigurer; import com.github.pig.common.bean.config.FilterIgnorePropertiesConfig; +import lombok.SneakyThrows; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.security.SecurityProperties; +import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.annotation.Order; +import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; @@ -54,4 +57,11 @@ public class PigSecurityConfigurerAdapter extends WebSecurityConfigurerAdapter { .csrf().disable(); http.apply(mobileSecurityConfigurer); } + + @Bean + @Override + @SneakyThrows + public AuthenticationManager authenticationManagerBean() { + return super.authenticationManagerBean(); + } } diff --git a/pig-common/pom.xml b/pig-common/pom.xml index 85c01bc4..e6f61c69 100644 --- a/pig-common/pom.xml +++ b/pig-common/pom.xml @@ -22,7 +22,7 @@ com.github.pig pig-common - 1.3.1 + 1.3.2 jar pig-common @@ -31,7 +31,7 @@ com.github pig - 1.3.1 + 1.3.2 diff --git a/pig-config/pom.xml b/pig-config/pom.xml index 806a52c2..f8e13e87 100644 --- a/pig-config/pom.xml +++ b/pig-config/pom.xml @@ -22,7 +22,7 @@ com.github.pig pig-config - 1.3.1 + 1.3.2 jar pig-config @@ -31,7 +31,7 @@ com.github pig - 1.3.1 + 1.3.2 diff --git a/pig-eureka/pom.xml b/pig-eureka/pom.xml index 2edd05e6..b5d73947 100644 --- a/pig-eureka/pom.xml +++ b/pig-eureka/pom.xml @@ -22,7 +22,7 @@ com.github.pig pig-eureka - 1.3.1 + 1.3.2 jar pig-eureka @@ -31,7 +31,7 @@ com.github pig - 1.3.1 + 1.3.2 diff --git a/pig-gateway/pom.xml b/pig-gateway/pom.xml index faa2a15a..3424761a 100644 --- a/pig-gateway/pom.xml +++ b/pig-gateway/pom.xml @@ -22,7 +22,7 @@ com.github.pig pig-gateway - 1.3.1 + 1.3.2 jar pig-gateway @@ -31,14 +31,14 @@ com.github pig - 1.3.1 + 1.3.2 com.github.pig pig-common - 1.3.1 + 1.3.2 diff --git a/pig-modules/pig-daemon-service/pom.xml b/pig-modules/pig-daemon-service/pom.xml index 933146a9..0c50b0ef 100644 --- a/pig-modules/pig-daemon-service/pom.xml +++ b/pig-modules/pig-daemon-service/pom.xml @@ -22,7 +22,7 @@ com.github.pig pig-daemon-service - 1.3.1 + 1.3.2 jar pig-daemon-service @@ -31,7 +31,7 @@ com.github.pig pig-modules - 1.3.1 + 1.3.2 @@ -43,7 +43,7 @@ com.github.pig pig-common - 1.3.1 + 1.3.2 com.github.xjzrc.spring.boot diff --git a/pig-modules/pig-mc-service/pom.xml b/pig-modules/pig-mc-service/pom.xml index 795d9978..3582c94b 100644 --- a/pig-modules/pig-mc-service/pom.xml +++ b/pig-modules/pig-mc-service/pom.xml @@ -22,7 +22,7 @@ com.github.pig pig-mc-service - 1.3.1 + 1.3.2 jar pig-mc-service @@ -31,14 +31,14 @@ com.github.pig pig-modules - 1.3.1 + 1.3.2 com.github.pig pig-common - 1.3.1 + 1.3.2 diff --git a/pig-modules/pig-sso-client-demo/pom.xml b/pig-modules/pig-sso-client-demo/pom.xml index d53e644d..e9ede689 100644 --- a/pig-modules/pig-sso-client-demo/pom.xml +++ b/pig-modules/pig-sso-client-demo/pom.xml @@ -22,7 +22,7 @@ com.github.pig pig-sso-client-demo - 1.3.1 + 1.3.2 jar pig-sso-client-demo @@ -31,7 +31,7 @@ com.github.pig pig-modules - 1.3.1 + 1.3.2 diff --git a/pig-modules/pig-upms-service/pom.xml b/pig-modules/pig-upms-service/pom.xml index e3120f52..f9bb4f8b 100644 --- a/pig-modules/pig-upms-service/pom.xml +++ b/pig-modules/pig-upms-service/pom.xml @@ -22,7 +22,7 @@ com.github.pig pig-upms-service - 1.3.1 + 1.3.2 jar pig-upms-service @@ -31,14 +31,14 @@ com.github.pig pig-modules - 1.3.1 + 1.3.2 com.github.pig pig-common - 1.3.1 + 1.3.2 diff --git a/pig-modules/pom.xml b/pig-modules/pom.xml index 5053a2b5..158dd508 100644 --- a/pig-modules/pom.xml +++ b/pig-modules/pom.xml @@ -20,13 +20,13 @@ pig com.github - 1.3.1 + 1.3.2 4.0.0 com.github.pig pig-modules - 1.3.1 + 1.3.2 pom pig-modules diff --git a/pig-visual/pig-monitor/pom.xml b/pig-visual/pig-monitor/pom.xml index c7dfe74d..51724ab4 100644 --- a/pig-visual/pig-monitor/pom.xml +++ b/pig-visual/pig-monitor/pom.xml @@ -22,7 +22,7 @@ com.github.pig pig-monitor - 1.3.1 + 1.3.2 jar pig-monitor @@ -31,14 +31,14 @@ com.github.pig pig-visual - 1.3.1 + 1.3.2 com.github.pig pig-common - 1.3.1 + 1.3.2 diff --git a/pig-visual/pig-monitor/src/main/java/com/github/pig/monitor/PigMonitorApplication.java b/pig-visual/pig-monitor/src/main/java/com/github/pig/monitor/PigMonitorApplication.java index 5b83cb8c..b5a0ba39 100644 --- a/pig-visual/pig-monitor/src/main/java/com/github/pig/monitor/PigMonitorApplication.java +++ b/pig-visual/pig-monitor/src/main/java/com/github/pig/monitor/PigMonitorApplication.java @@ -47,30 +47,4 @@ public class PigMonitorApplication { public static void main(String[] args) { SpringApplication.run(PigMonitorApplication.class, args); } - - @Configuration - public static class NotifierConfig { - @Bean - @Primary - public RemindingNotifier remindingNotifier() { - RemindingNotifier notifier = new RemindingNotifier(filteringNotifier(loggerNotifier())); - notifier.setReminderPeriod(TimeUnit.SECONDS.toMillis(10)); - return notifier; - } - - @Scheduled(fixedRate = 1_000L) - public void remind() { - remindingNotifier().sendReminders(); - } - - @Bean - public FilteringNotifier filteringNotifier(Notifier delegate) { - return new FilteringNotifier(delegate); - } - - @Bean - public LoggingNotifier loggerNotifier() { - return new LoggingNotifier(); - } - } } diff --git a/pig-visual/pig-monitor/src/main/java/com/github/pig/monitor/config/PigNotifierConfiguration.java b/pig-visual/pig-monitor/src/main/java/com/github/pig/monitor/config/PigNotifierConfiguration.java index 6b525dfc..734d6b68 100644 --- a/pig-visual/pig-monitor/src/main/java/com/github/pig/monitor/config/PigNotifierConfiguration.java +++ b/pig-visual/pig-monitor/src/main/java/com/github/pig/monitor/config/PigNotifierConfiguration.java @@ -24,6 +24,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Primary; +import org.springframework.core.Ordered; +import org.springframework.core.annotation.Order; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.annotation.Scheduled; @@ -32,7 +34,7 @@ import java.util.concurrent.TimeUnit; /** * @author lengleng * @date 2018/1/25 - * 监控提醒配置 + * 监控提醒配置 */ @Configuration @EnableScheduling @@ -41,6 +43,7 @@ public class PigNotifierConfiguration { private RabbitTemplate rabbitTemplate; @Autowired private MonitorPropertiesConfig monitorPropertiesConfig; + @Bean @Primary public RemindingNotifier remindingNotifier() { @@ -50,8 +53,9 @@ public class PigNotifierConfiguration { } @Bean - public StatusChangeNotifier mobileNotifier(){ - return new StatusChangeNotifier(monitorPropertiesConfig,rabbitTemplate); + @Order(Ordered.HIGHEST_PRECEDENCE) + public StatusChangeNotifier mobileNotifier() { + return new StatusChangeNotifier(monitorPropertiesConfig, rabbitTemplate); } @Scheduled(fixedRate = 60_000L) diff --git a/pig-visual/pig-zipkin-db/pom.xml b/pig-visual/pig-zipkin-db/pom.xml index e202c714..b51124aa 100644 --- a/pig-visual/pig-zipkin-db/pom.xml +++ b/pig-visual/pig-zipkin-db/pom.xml @@ -23,7 +23,7 @@ com.github.pig pig-zipkin-db - 1.3.1 + 1.3.2 jar pig-zipkin-db @@ -32,13 +32,13 @@ com.github.pig pig-visual - 1.3.1 + 1.3.2 com.github.pig pig-common - 1.3.1 + 1.3.2 io.zipkin.java diff --git a/pig-visual/pig-zipkin-elk/pom.xml b/pig-visual/pig-zipkin-elk/pom.xml index e37cf535..d7b39613 100644 --- a/pig-visual/pig-zipkin-elk/pom.xml +++ b/pig-visual/pig-zipkin-elk/pom.xml @@ -22,7 +22,7 @@ com.github.pig pig-zipkin-elk - 1.3.1 + 1.3.2 jar pig-zipkin-elk @@ -31,14 +31,14 @@ com.github.pig pig-visual - 1.3.1 + 1.3.2 com.github.pig pig-common - 1.3.1 + 1.3.2 io.github.openfeign diff --git a/pig-visual/pom.xml b/pig-visual/pom.xml index d0faa8ab..57352a73 100644 --- a/pig-visual/pom.xml +++ b/pig-visual/pom.xml @@ -21,7 +21,7 @@ com.github.pig pig-visual - 1.3.1 + 1.3.2 pom pig-visual @@ -30,7 +30,7 @@ pig com.github - 1.3.1 + 1.3.2 diff --git a/pom.xml b/pom.xml index 15189993..9db79812 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ com.github pig - 1.3.1 + 1.3.2 pom