我可以在 Java EE 6 应用程序中使用 JAX-RS 2.0
Can I use JAX-RS 2.0 in Java EE 6 application
我们知道 JAX-RS 1.1 是 Java EE 6.
的一部分
是否可以在 JavaEE 6 应用程序中使用 JAX-RS 2.0 作为依赖项?
JSR 339: JAX-RS 2.0: The Java API for RESTful Web Services 的规范明确说明了是否可以在 Java EE 6 应用程序中使用它,答案是肯定的:
2.2 What is the target Java platform? (i.e., desktop, server, personal, embedded, card, etc.)
This specification is targeted for Java SE 6.0 or higher and Java EE 6
or higher platforms.
2.3 The Executive Committees would like to ensure JSR submitters think about how their proposed technology relates to all of the Java
platform editions. Please provide details here for which platform
editions are being targeted by this JSR, and how this JSR has
considered the relationship with the other platform editions.
This JSR will be available standalone. It is also targeted for
inclusion in the Java EE 7 platform. Additionally, Java EE 6 products
will be allowed to implement JAX-RS 2.0 instead of JAX-RS 1.1.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
更新:
再说明几点:
请参阅 https://bugs.eclipse.org/bugs/show_bug.cgi?id=416704,它修复了在使用 JAX-RS 2.0 facet 时 Eclipse 错误地需要 Java 7 而不是 Java 6 的错误。
O'Reilly 的 RESTful Java with JAX-RS 2.0 只需要 "JDK 6.0 or later" 到 运行 它的例子。
请注意 JAX-RS 2.1 需要 Java 8 因为 "The API will make extensive use of annotations and lambda expressions that require Java SE 8 or later."
我们知道 JAX-RS 1.1 是 Java EE 6.
的一部分是否可以在 JavaEE 6 应用程序中使用 JAX-RS 2.0 作为依赖项?
JSR 339: JAX-RS 2.0: The Java API for RESTful Web Services 的规范明确说明了是否可以在 Java EE 6 应用程序中使用它,答案是肯定的:
2.2 What is the target Java platform? (i.e., desktop, server, personal, embedded, card, etc.)
This specification is targeted for Java SE 6.0 or higher and Java EE 6 or higher platforms.
2.3 The Executive Committees would like to ensure JSR submitters think about how their proposed technology relates to all of the Java platform editions. Please provide details here for which platform editions are being targeted by this JSR, and how this JSR has considered the relationship with the other platform editions.
This JSR will be available standalone. It is also targeted for inclusion in the Java EE 7 platform. Additionally, Java EE 6 products will be allowed to implement JAX-RS 2.0 instead of JAX-RS 1.1.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 更新:
再说明几点:
请参阅 https://bugs.eclipse.org/bugs/show_bug.cgi?id=416704,它修复了在使用 JAX-RS 2.0 facet 时 Eclipse 错误地需要 Java 7 而不是 Java 6 的错误。
O'Reilly 的 RESTful Java with JAX-RS 2.0 只需要 "JDK 6.0 or later" 到 运行 它的例子。
请注意 JAX-RS 2.1 需要 Java 8 因为 "The API will make extensive use of annotations and lambda expressions that require Java SE 8 or later."