apache - 如何在 Springboot 2.1.1 Final 中配置 CXF servlet?

标签 apache soap cxf

请找出我面临的错误: 在 springboot 2.1.1 中,我遇到以下错误:


APPLICATION FAILED TO START


Description: Parameter 1 of constructor in org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration required a bean of type 'org.springframework.boot.autoconfigure.web.servlet.DispatcherServletPath' that could not be found. The following candidates were found but could not be injected: - Bean method 'dispatcherServletRegistration' in 'DispatcherServletAutoConfiguration.DispatcherServletRegistrationConfiguration' not loaded because DispatcherServlet Registration found non dispatcher servlet dispatcherServlet

Action:

Consider revisiting the entries above or defining a bean of type 'org.springframework.boot.autoconfigure.web.servlet.DispatcherServletPath' in your configuration.

我的配置:

@Configuration
public class CXFConfig {

    @Bean
    public ServletRegistrationBean dispatcherServlet() {

        final ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(new CXFCdiServlet(), "/services/*");
        servletRegistrationBean.setLoadOnStartup(1);
        return servletRegistrationBean;
    }

    @Bean(name = Bus.DEFAULT_BUS_ID)
    public SpringBus springBus() {
        SpringBus springBus = new SpringBus();
        springBus.getInInterceptors().add(new AppInboundInterceptor());
        springBus.getOutInterceptors().add(new AppOutboundInterceptor());
        return springBus;
    }

}

请确认如何进行配置?

dispatcherServlet() 方法在 Springboot 2.1.1 中不起作用

最佳答案

我通过将方法名称从 dispatcherServlet 更改为 disServlet 解决了这个问题。 也许你可以试试。

关于apache - 如何在 Springboot 2.1.1 Final 中配置 CXF servlet?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53987157/

相关文章:

node.js - 从node.js中的wsdl生成请求xml

java - CXF-http-conf :conduit timeout is being ignored

apache - 无法将 mod_ssl.so 加载到服务器 : ap_map_http_request_error

java - 为 Apache ANT 启用 javac 调试

.net - 为 SOAP 网络服务生成非双工代理代码

java - 在 pom.xml 中定义 wsdl2java 参数

java - CXF 使用的类中的公共(public)方法上的@Transactional 问题

java - TOMCAT如何在系统中定位JRE?

php - 在 JQuery AJAX POST 上...请求失败 : URI too long (longer than 8190)

android - 在 kSoap2 中使用 TLS1.2 客户端证书