只有 Spring-MVC 需要哪些 jars?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13685579/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 05:34:04  来源:igfitidea点击:

What are the jars needed for only Spring-MVC?

springspring-mvcspring-webflow

提问by Adalarasan_New

I need to run the Spring-MVC in my scratch project. At the same time i have minimum memory area to store all the jar files. So any body recommend me only need for the Spring-MVC not any other jar files. Thanks in Advance.

我需要在我的临时项目中运行 Spring-MVC。同时我有最小的内存区域来存储所有的 jar 文件。所以任何机构都推荐我只需要 Spring-MVC 而不是任何其他 jar 文件。提前致谢。

回答by Yevgeniy

according to maven, spring-webmvc 3.1.2need following jar:

根据 maven,spring-webmvc3.1.2需要以下 jar:

  • aopalliance-1.0.jar
  • commons-logging-1.1.1.jar
  • spring-webmvc-3.1.2.RELEASE.jar
  • spring-asm-3.1.2.RELEASE.jar
  • spring-beans-3.1.2.RELEASE.jar
  • spring-core-3.1.2.RELEASE.jar
  • spring-context-3.1.2.RELEASE.jar
  • spring-aop-3.1.2.RELEASE.jar
  • spring-expression-3.1.2.RELEASE.jar
  • spring-context-support-3.1.2.RELEASE.jar
  • spring-web-3.1.2.RELEASE.jar
  • aopalliance-1.0.jar
  • commons-logging-1.1.1.jar
  • spring-webmvc-3.1.2.RELEASE.jar
  • spring-asm-3.1.2.RELEASE.jar
  • spring-beans-3.1.2.RELEASE.jar
  • spring-core-3.1.2.RELEASE.jar
  • spring-context-3.1.2.RELEASE.jar
  • spring-aop-3.1.2.RELEASE.jar
  • spring-expression-3.1.2.RELEASE.jar
  • spring-context-support-3.1.2.RELEASE.jar
  • spring-web-3.1.2.RELEASE.jar

things provided by servlet container (f.e. servlet-api) are left out.

servlet 容器(fe servlet-api)提供的东西被排除在外。

回答by NimChimpsky

<dependency>
  <groupId>org.springframework</groupId>
  <artifactId>spring-web</artifactId>
  <version>3.1.0.RELEASE</version>
</dependency>
<dependency>
  <groupId>org.springframework</groupId>
  <artifactId>spring-core</artifactId>
  <version>3.1.0.RELEASE</version>
  <exclusions>
    <exclusion>
      <artifactId>commons-logging</artifactId>
      <groupId>commons-logging</groupId>
    </exclusion>
  </exclusions>
</dependency>
<dependency>
  <groupId>org.springframework</groupId>
  <artifactId>spring-webmvc</artifactId>
  <version>3.1.0.RELEASE</version>
</dependency>