kam*_*aci 6 java web-services spring-boot
我有一个既有JAX-RS又有JAX-WS的现有API.我想将它迁移到Spring Boot应用程序中.我为JAX-RS部分所做的就是注册该类:
@GET
@Path("/ping")
@Produces("text/plain")
String ping();
Run Code Online (Sandbox Code Playgroud)
进入一个Jersey Config
延伸ResourceConfig
.以下是来自同一类的JAX-WS的示例:
@WebMethod(operationName = "Ping", action = "ping-app")
String ping();
Run Code Online (Sandbox Code Playgroud)
由于我使用了JAX-RS和JAX-WS的参考实现,我希望将它迁移到Spring Boot中应该很容易.我很容易完成JAX-RS集成.有没有这么简单的方法来集成JAX-WS呢?
我个人没有使用这个,但似乎 spring 提供了 JAX-WS 的入门包
看看这件神器。只需将此依赖项添加到您的项目中就足够了:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jersey</artifactId>
</dependency>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
1674 次 |
最近记录: |