如何在Eclipse IDE项目文件夹中为spring添加jar文件 [英] How to add jar files for spring in Eclipse IDE project folder

查看:447
本文介绍了如何在Eclipse IDE项目文件夹中为spring添加jar文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将使用Spring框架启动MVC,但是我无法获取spring框架的jar文件。我已经尝试过帮助菜单>安装新软件>添加新的Eclipse IDE但我失败了。任何人都可以指导我吗?

解决方案

您可以尝试从此链接下载STS(Spring Source Tool Suite):



http://spring.io/tools



当然,您应该尝试易于使用的Maven,并为您在项目中处理的库和其他组件增加价值。



如果要手动添加库,工作没有任何图书馆处理程序,如maven,那么你可以执行以下操作:


  1. 创建一个新的Java项目

  2. 在您的项目中,右键单击然后创建一个新文件夹,称为libs

  3. 下载最新的Spring 3 MVC库:http://projects.spring.io/spring-framework/

  4. 下载库后,提取您所创建的文件夹libs中的zip内容并将所需的jar文件复制。

  5. 一旦你复制文件到文件夹,选择所有文件,右键单击,查看构建路径,然后单击添加到构建路径

  6. 然后在项目资源管理器中,您将可以看到在参考库中有Spring库。

  7. 只要玩得开心。

但是按照推荐和建议,尝试下载maven,如果您从Eclipse Market进行安装,则还可以进行集成:m2eclipse。



然后,另一个选项是像许多人一样回答你:使用STS,它与maven一起提供,并使您的工作更轻松快捷。



现在好像Spring只是想和依赖管理员一起工作你可以去中央信息库并下载所需的部分,在这里你有链接:

  http:// mvnrepository。 com / artifact / org.springframework / 

问候。


I am going to start MVC with Spring framework, but I am unable to get jar file of spring framework .I have tried in help menu>install new software>add new in Eclipse IDE but I failed. Can anyone please guide me ?

解决方案

You can try download STS (Spring Source Tool Suite) from this link:

http://spring.io/tools

Of course, you should try Maven which is easy to use and adds value to the libraries and additional components you handle in your project.

If you want to add the libraries manually and work without any library handler like maven, then you can do the following:

  1. Create a new Java Project
  2. Over your project, right click and then create a new folder, call it "libs"
  3. Download the latest libraries of Spring 3 MVC: http://projects.spring.io/spring-framework/
  4. Once you've downloaded the libraries, extract the content of the zip and copy the required "jar" files inside the folder "libs" you've just created.
  5. Once you copied the files to the folder, select all the files, right-click, look at "Build Path" and click on "Add to Build Path"
  6. then in the project explorer, you will be able to see that in "Referenced Libraries" you have the Spring libraries.
  7. Just have fun.

But as recommended and suggested, try downloading maven, there is an integration also if you go and install from the Eclipse Market: m2eclipse.

Then, another option is like many people answered you: use STS, which comes with maven and will make your work easier and faster.

Now seems like Spring just wants to work with dependency managers, so you can go to the central repository and download the parts you need, here you have the link:

http://mvnrepository.com/artifact/org.springframework/

Regards.

这篇关于如何在Eclipse IDE项目文件夹中为spring添加jar文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆