雷哥带你了解SSO单点登录
1 package com.xiaoxiang.crm.config; 2 3 import org.springframework.context.annotation.Configuration; 4 import org.springframework.web.servlet.config.annotation.CorsRegistry; 5 import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 6 7 /** 8 * @Author: husToy.Wang 9 * @Date: 2019/5/24 16:35 10 * @Version 1.0 11 */ 12 @Configuration 13 public class WebMvcConfig implements WebMvcConfigurer { 14 15 //@Autowired 16 //LoginInterceptor loginInterceptor; 17 18 19 /** 20 * 跨域配置 21 * 22 * @param registry 23 */ 24 @Override 25 public void addCorsMappings(CorsRegistry registry) { 26 registry.addMapping("/**") 27 .allowCredentials(true) 28 .allowedHeaders("*") 29 .allowedMethods("*") 30 .allowedOrigins("*") 31 .maxAge(36000000L); 32 } 33 34 /** 35 * 拦截器配置 36 * 37 * @param registry 38 */ 39 //@Override 40 //public void addInterceptors(InterceptorRegistry registry) { 41 // registry.addInterceptor(loginInterceptor) 42 // .excludePathPatterns("/login/**") 43 // .addPathPatterns("/**"); 44 //} 45 }
技术改变一切