尤里卡和泽西岛 2.x [英] Eureka and Jersey 2.x

查看:90
本文介绍了尤里卡和泽西岛 2.x的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Spring Boot 并寻找发现服务器.我看到spring-cloud-starter-netflix-eureka-server"依赖 Jersey 1.x,这不是在我的环境中使用的选项.有几个线程在谈论增加与 Jersey 2.x 的兼容性,还有一些线程在谈论一起删除 Jersey.

I am using Spring Boot and looking for a discovery server. I see that "spring-cloud-starter-netflix-eureka-server" has a dependency on Jersey 1.x which is not an option to use in my environment. There are a couple of threads talking about adding compatibility with Jersey 2.x and some others talking about removing Jersey all together.

但是,我没有看到与这些选项中的任何一个以及如何使用它们相关的文档/代码的任何链接.有人可以指点我这里的选项吗?

However I don't see any links to documentation/code related to either of these options and how to use them. Can someone please point me to the options I have here?

以下是到目前为止我能够收集到的链接:
https://github.com/Netflix/eureka/issues/600
https://github.com/Netflix/eureka/树/contrib/jersey2-compatibility/eureka-core-jersey2

Here are the links I was able to gather on this so far:
https://github.com/Netflix/eureka/issues/600
https://github.com/Netflix/eureka/tree/contrib/jersey2-compatibility/eureka-core-jersey2

推荐答案

以下依赖项对我有用.看我的pom

Below dependencies worked for me. See my pom

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.0.3.RELEASE</version>
</parent>
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
    <version>2.0.0.RELEASE</version>
    <exclusions>
        <exclusion>
          <groupId>javax.ws.rs</groupId>
          <artifactId>jsr311-api</artifactId>
       </exclusion>
    </exclusions>
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-jersey</artifactId>
</dependency>

这篇关于尤里卡和泽西岛 2.x的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆