Ver código fonte

优化:去掉自定义校验类,使用公共组件dmp-auth-starter中的类

lijie 3 anos atrás
pai
commit
fdf8608d73

+ 0 - 23
adm-business/adm-middleware/src/main/java/com/persagy/proxy/common/config/AdmMiddlewareWebConfigurer.java

@@ -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();
-    }
 }

+ 1 - 0
adm-business/adm-middleware/src/main/java/com/persagy/proxy/common/service/impl/EmsAuthServiceImpl.java

@@ -27,6 +27,7 @@ import java.util.stream.Collectors;
  * @author Charlie Yu
  * @date 2021-11-02
  */
+@Deprecated
 public class EmsAuthServiceImpl extends AbstractAuthServiceImpl {
     @Autowired
     private EmsSaasWebClient emsSaasWebClient;

+ 1 - 0
adm-business/adm-middleware/src/main/java/com/persagy/proxy/common/service/impl/NoneAuthServiceImpl.java

@@ -15,6 +15,7 @@ import javax.servlet.http.HttpServletResponse;
  * @author Charlie Yu
  * @date 2021-11-02
  */
+@Deprecated
 public class NoneAuthServiceImpl extends AbstractAuthServiceImpl {
 
     @Override