|
@@ -1,11 +1,6 @@
|
|
|
package com.persagy.proxy.common.config;
|
|
|
|
|
|
-import com.persagy.dmp.auth.client.EmsSaasWebFallbackFactory;
|
|
|
import com.persagy.dmp.auth.handler.AppContextHandler;
|
|
|
-import com.persagy.dmp.auth.service.AuthService;
|
|
|
-import com.persagy.proxy.common.service.impl.EmsAuthServiceImpl;
|
|
|
-import com.persagy.proxy.common.service.impl.NoneAuthServiceImpl;
|
|
|
-import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
import org.springframework.core.annotation.Order;
|
|
@@ -35,22 +30,4 @@ public class AdmMiddlewareWebConfigurer implements WebMvcConfigurer {
|
|
|
// 设置拦截的路径、不拦截的路径、优先级等等
|
|
|
registry.addInterceptor(appContextHandler()).order(11).addPathPatterns(includePaths).excludePathPatterns(excludePaths);
|
|
|
}
|
|
|
-
|
|
|
- @Bean
|
|
|
- @ConditionalOnProperty(value = "persagy.common.auth.channel", havingValue = "1")
|
|
|
- public EmsSaasWebFallbackFactory emsSaasWebFallbackFactory(){
|
|
|
- return new EmsSaasWebFallbackFactory();
|
|
|
- }
|
|
|
-
|
|
|
- @Bean
|
|
|
- @ConditionalOnProperty(value = "persagy.common.auth.channel", havingValue = "1")
|
|
|
- public AuthService emsAuthServiceImpl(){
|
|
|
- return new EmsAuthServiceImpl();
|
|
|
- }
|
|
|
-
|
|
|
- @Bean
|
|
|
- @ConditionalOnProperty(value = "persagy.common.auth.channel", havingValue = "-1",matchIfMissing = true)
|
|
|
- public AuthService noneAuthServiceImpl(){
|
|
|
- return new NoneAuthServiceImpl();
|
|
|
- }
|
|
|
}
|