mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-10 11:29:20 +00:00
Spring Web Services Starter
- upgraded Spring WS to 2.2.0.RELEASE - replaced default MVC DispatcherServlet with MessageDispatcherServlet - migrated XML based config with nww Spring WS Java config Fixes: gh-412
This commit is contained in:
committed by
Andy Wilkinson
parent
e2a449da97
commit
95a6ce9e48
+3
-25
@@ -2,12 +2,8 @@ package sample.ws;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.context.embedded.ServletRegistrationBean;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.ImportResource;
|
||||
import org.springframework.ws.transport.http.MessageDispatcherServlet;
|
||||
|
||||
/**
|
||||
* Created by in329dei on 28-2-14.
|
||||
@@ -15,27 +11,9 @@ import org.springframework.ws.transport.http.MessageDispatcherServlet;
|
||||
@Configuration
|
||||
@EnableAutoConfiguration
|
||||
@ComponentScan
|
||||
@ImportResource("classpath:/META-INF/spring/spring-ws-context.xml")
|
||||
public class SampleWsApplication {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
SpringApplication.run(SampleWsApplication.class, args);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ServletRegistrationBean messageDispatcherServletRegistration() {
|
||||
MessageDispatcherServlet mds = new MessageDispatcherServlet();
|
||||
mds.setTransformWsdlLocations(true);
|
||||
|
||||
ServletRegistrationBean srb = new ServletRegistrationBean(messageDispatcherServlet(), "/services/*");
|
||||
srb.setLoadOnStartup(1);
|
||||
return srb;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public MessageDispatcherServlet messageDispatcherServlet() {
|
||||
MessageDispatcherServlet mds = new MessageDispatcherServlet();
|
||||
mds.setTransformWsdlLocations(true);
|
||||
return mds;
|
||||
}
|
||||
public static void main(String[] args) throws Exception {
|
||||
SpringApplication.run(SampleWsApplication.class, args);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user