我正完全按照下面的教程
http://www.springboottutorial.com/creating-soap-web-service-with-spring-boot-web-services-starter
我将代码部署到Wildfly,当我点击时遇到404错误: http://localhost:8080/ws/students.wsdl
尝试实现WebApplicationInitializer,并且能够调试WebServiceConfig,但仍然会收到404错误。我的映射错了吗?我需要WebApplicationInitializer吗?我的问题在其他地方吗?
public class WebAppInitializer implements WebApplicationInitializer {
@Override
public void onStartup(ServletContext servletContext) throws ServletException {
AnnotationConfigWebApplicationContext appContext = new AnnotationConfigWebApplicationContext();
appContext.register(WebServiceConfig.class);
ServletRegistration.Dynamic dispatcher = servletContext.addServlet(
"SpringDispatcher", new DispatcherServlet(appContext));
dispatcher.setLoadOnStartup(1);
/*dispatcher.addMapping("/");*/
/*dispatcher.addMapping("/ws/*");*/
dispatcher.addMapping("/ws*");
}
}