什么是 org.glassfish.jersey.core

What is org.glassfish.jersey.core

要创建 REST 网络服务,我通常只使用 com.sun.jersey;但现在,我也一直看到 org.glassfish.jersey.core。所以,我想知道什么是 org.glassfish.jersey.core?这是 JAX-RS 的另一种实现吗?

com.sun.jersey 包是 Jersey 1.x(包含在 Glassfish 3.x 中)。

org.glassfish.jersey.core 包是 Jersey 2.x(包含在 Glassfish 4.x 中)。

您不应在 Web 应用程序中混合使用这两个版本。