Last active
August 29, 2015 14:23
-
-
Save zeroows/84281b31dcfc98b88cbf to your computer and use it in GitHub Desktop.
Defining CXF endpoint in JavaConfig spring boot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * To enable web services of Apache CXF | |
| */ | |
| @Configuration | |
| @ImportResource({"classpath:META-INF/cxf/cxf.xml"}) | |
| protected static class CXFConfiguration { | |
| @Autowired | |
| private Bus cxfBus; | |
| @Bean | |
| public Endpoint endpoint() { | |
| Endpoint endpoint = new EndpointImpl(cxfBus, new NotificationImpl()); | |
| endpoint.publish("/Notification"); | |
| return endpoint; | |
| } | |
| @Bean | |
| public ServletRegistrationBean webservices() { | |
| final ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(new CXFServlet(),"/ws/*"); | |
| servletRegistrationBean.setLoadOnStartup(1); | |
| return servletRegistrationBean; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment