springboot项目调用webservice客户端 问题

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了springboot项目调用webservice客户端 问题相关的知识,希望对你有一定的参考价值。

springboot项目调用webservice客户端。 项目正常启动调用webservice客户端接口没问题。当项目热启动后调用同样webservice客户端接口报错

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,小伙伴儿们快去试试把!!!

以上是关于springboot项目调用webservice客户端 问题的主要内容,如果未能解决你的问题,请参考以下文章

springboot项目怎么调用深度算法

springboot项目调用webservice客户端 问题

springboot使用ImportResource注解加载spring配置文件(传智播客代码)

Java牛客项目课_仿牛客网讨论区_第二章

两个SpringBoot项目之间调用

处理事务回滚