Idea+StringBoot+cxf
来源:互联网 发布:reflower for mac 编辑:程序博客网 时间:2024/06/01 07:48
StringBoot项目,maven 项目管理,
1.首先需要加入如下的pom
<!-- CXF Start 3.1.6--><dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-frontend-jaxws</artifactId> <version>2.5.1</version></dependency><dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-transports-http</artifactId> <version>2.5.1</version></dependency><!-- CXF END-->
由于我调用的是Oracle的一个webservice框架,版本较老,所以只能用2.5.1版本的cxf。
@Beanpublic ServletRegistrationBean dispatcherServlet() { return new ServletRegistrationBean(new CXFServlet(), "/soap/*");}@Bean(name = Bus.DEFAULT_BUS_ID)public SpringBus springBus() { return new SpringBus();}/** 接口注入* */@Beanpublic User user() { return new UserImpl();}/** 发布接口* */@Beanpublic Endpoint endpoint() { EndpointImpl endpoint = new EndpointImpl(springBus(), user()); endpoint.publish("/user"); return endpoint;}
2.Application中加入以上代码
运行即可发布成功,输入http://localhost:8080/soap/测试下是否成功。
阅读全文
0 0
- Idea+StringBoot+cxf
- IDEA+maven+CXF+WebService
- StringBoot + String定时器
- StringBoot整合Shiro
- StringBoot实现多查询
- StringBoot实现多表查询
- StringBoot多数据源支持
- java使用idea、dubbox、cxf构建web service
- StringBoot集成Rabbit,根据业务返回ACK
- StringBoot集成Rabbit,根据业务返回ACK
- StringBoot集成Rabbit,根据业务返回ACK
- CXF
- CXF
- cxf
- CXF
- CXF
- CXF
- CXF
- #python练习#leetcode 406. Queue Reconstruction by Height【贪心】
- Sass与less的区别
- 获取当前日期和时间并格式输出
- centos 安装php扩展redis
- hihoCoder 156周 岛屿
- Idea+StringBoot+cxf
- iOS之地图与定位
- 移动前端不得不了解的html5 head 头标签
- 在springboot项目中访问mongodb的
- 宝塔Linux面板-宝塔面板快速建站详细教程
- 向量的求导
- UML的十三种图
- 最长公共子序列-LintCode
- SonarQube的介绍