java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [META-INF/services/org.apache.axis.EngineConfigurationFactory]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
参考技术A@Configurationpublic class CorsConfig private CorsConfiguration buildConfig() CorsConfiguration corsConfiguration = new CorsConfiguration();corsConfiguration.addAllowedOrigin("*");corsConfiguration.addAllowedHeader("*");corsConfiguration.addAllowedMethod("*"); return corsConfiguration; @Beanpublic CorsFilter corsFilter() UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();source.registerCorsConfiguration("/**", buildConfig()); return new CorsFilter(source); 1-新建配置文件,添加Configuration注解 2-测试跨域请求通过,至此已完美解决ajax跨域问题,是不是很easy,小伙伴儿们快去试试把!!!