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整合cxf发布webService和客户端的调用

SpringBoot发布webservice服务并调用(hutool yyds)

基于Springboot整合RestTemplate调用Webservice接口

SpringBoot + CXF快速实现SOAP WebService(支持Basic Auth)

springboot 整合 cxf 发布webservice与调用

java程序怎么调用webservice接口,实现发送短信功能