是什么的JavaEE的API和JavaEE的-Web的API之间的区别? [英] What is the difference between javaee-api and javaee-web-api?
问题描述
我知道这些依赖都需要对编译Java Servlet规范,等等,但我不是在它们之间的区别清楚,当我应该使用一个,而不是其他。
它们之间有什么区别?是一个接一个的超集?
<&依赖性GT;
<&的groupId GT;&的javax LT; /的groupId>
<&的artifactId GT;的JavaEE-API< / artifactId的>
<&版GT; 6.0< /版本>
<&范围GT;及提供LT; /&范围GT;
< /依赖性>依赖>
<&的groupId GT;&的javax LT; /的groupId>
<&的artifactId GT;的JavaEE的web-API< / artifactId的>
<&版GT; 6.0< /版本>
<&范围GT;及提供LT; /&范围GT;
< /依赖性>
的 JavaEE的-Web的API
是应该支持的Java EE Web Profile的。
Java EE 6中引入,在Web配置文件从根本上简化了平台,能够实现轻量,敏捷,引人注目的应用程序服务器的新曙光的创建与激光聚焦于Web应用程序开发。
块引用>不过,如果你比较两个不同的JAR文件还有一点,那它们之间的不同。我打开它们在7-ZIP和这两个屏幕截图显示的唯一(据我所知)的差异,即没有在
的JMS不支持的JavaEE的web-API
和的XML
图书馆似乎是在的JavaEE的API更大
。
的JavaEE-API
JavaEE的-Web的API
I realise these dependencies are required for compiling against Java servlet specification, and so on, but I'm not clear on the differences between them, and when I should use one as opposed to the other.
What is the difference between them? Is one a superset of the other?
<dependency> <groupId>javax</groupId> <artifactId>javaee-api</artifactId> <version>6.0</version> <scope>provided</scope> </dependency> dependency> <groupId>javax</groupId> <artifactId>javaee-web-api</artifactId> <version>6.0</version> <scope>provided</scope> </dependency>
解决方案The
javaee-web-api
is supposed to support the Java EE Web Profile.Introduced in Java EE 6, the Web Profile radically streamlines the platform and enables the creation of a new dawn of lightweight, agile, compelling application servers with a laser focus on web application development.
However if you compare the two different jar files there is little that differs between them. I opened them up in 7-zip and these two screenshots shows the only (AFAIK) differences, namely that there is no support for JMS in the
javaee-web-api
and that thexml
library seems to be larger in thejavaee-api
.
javaee-api
javaee-web-api
这篇关于是什么的JavaEE的API和JavaEE的-Web的API之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!