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.