我可以在 Java EE 6 应用程序中使用 JAX-RS 2.0

Can I use JAX-RS 2.0 in Java EE 6 application

我们知道 JAX-RS 1.1Java 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.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 更新:

再说明几点: