关于spring boot 2.x IE9的跨域问题
< 返回列表时间: 2019-01-12来源:开源中国
HDC调试需求开发(15万预算),能者速来!>>> @Configuration public class CorsConfig extends WebMvcConfigurationSupport{ @Override protected void addCorsMappings(CorsRegistry registry) { registry .addMapping("/**")// 4对接口配置跨域设置 .allowedMethods("*")// 3允许任何方法(post、get等) .allowedHeaders("*")// 2允许任何头 .allowedOrigins("*")//1允许任何域名使用, .allowCredentials(true);// 默认不支持User Credentials } //swagger2 跨域配置 @Override protected void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/**").addResourceLocations("classpath:/static/"); registry.addResourceHandler("doc.html") .addResourceLocations("classpath:/META-INF/resources/"); registry.addResourceHandler("/webjars/**") .addResourceLocations("classpath:/META-INF/resources/webjars/"); super.addResourceHandlers(registry); } }
问题如下:
我已经配置好,CORS,配置代码如上,现在的问题是.前端 使用localhost:8087 登陆,保存在session中的信息不会丢失,一切正常,但是使用192.169.0.22:8087的时候,在ie9的环境里,session保存的用户信息就丢失了.经理说参考一下P3P的配置.但是百度了好久,没有关于springboot下的p3p配置,参考了一下帖子里的配置,并没有生效.所以想问一下原因.以及解决方案.
我目前想到的是把session 换成 redis session试试,结果在使用redis的时候.发现redis 的包.和我在用的quartz包起冲突了,实在莫得办法了.请教一下各位大佬. 报错信息 Description: An attempt was made to call the method org.quartz.Scheduler.getListenerManager()Lorg/quartz/ListenerManager; but it does not exist. Its class, org.quartz.Scheduler, is available from the following locations: jar:file:/C:/Users/Zmm/.m2/repository/org/quartz-scheduler/quartz/1.8.6/quartz-1.8.6.jar!/org/quartz/Scheduler.class It was loaded from the following location: file:/C:/Users/Zmm/.m2/repository/org/quartz-scheduler/quartz/1.8.6/quartz-1.8.6.jar Action: Correct the classpath of your application so that it contains a single, compatible version of org.quartz.Scheduler
热门排行