After SpringBoot integrates webservice, other routes visit the blank page except that the registered endpoint can access it.

SpringBoot after integrating WebService , only WebService registered endpoints can access it, and other routes visit the blank page. The specific code is as follows:

configuration of Webservice

@Configuration
public class WebServiceConfig {

    @Bean(name = Bus.DEFAULT_BUS_ID)
    public SpringBus springBus() {
        SpringBus springBus = new SpringBus();
        return springBus;
    }

    @Bean
    public ServletRegistrationBean dispatcherServlet() {
        return new ServletRegistrationBean(new CXFServlet(), "/services/*");
    }

    @Bean
    public DataImportService dataImportService() {
        return new DataImportServiceImpl();
    }

    @Bean
    public Endpoint endpoint() {
        EndpointImpl endpoint = new EndpointImpl(springBus(), dataImportService());
        endpoint.publish("/dataImport");
        return endpoint;
    }

}

Intercept of routes

        http.csrf().disable().authorizeRequests().antMatchers("/", "/services/**").permitAll()
        ...
< hr >

the current situation is WebService open xxx/services/dataImport can be accessed, other routes can be accessed, no errors are reported, but the page is blank.

Mar.07,2021

after checking, it is due to the misleading of the relevant jar package.
before modification:

clipboard.png
:

clipboard.png

Menu