mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-10 11:29:20 +00:00
Spring Web Services Starter and Sample Project
Fixes gh-412
This commit is contained in:
committed by
Andy Wilkinson
parent
b5d267ca89
commit
e2a449da97
+41
@@ -0,0 +1,41 @@
|
||||
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.
|
||||
*/
|
||||
@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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user