在spring官网上下载相关的插件,然后导入到eclipse中,以下是下载步骤:
1、查看自己eclipse版本是多少,help-->About Eclipse
2、点击官网,现在该从官网上下载插件包了,但是进到官网上看到的都是类似于这种:http://download.springsource.com/release/STS/3.8.1.RELEASE/dist/e4.6/spring-tool-suite-3.8.1.RELEASE-e4.6-win32-x86_64.zip格式的,切记不要下载,我们安装spring boot 插件需要下载 以 updatesite.zip结尾的压缩文件。
3、下面给出eclipse4.4.2插件包的路径:https://download.springsource.com/release/STS/3.6.4.RELEASE/dist/e4.4/spring-tool-suite-3.6.4.RELEASE-e4.4.2-win32-x86_64.zip
所需插件路径:
https://download.springsource.com/release/TOOLS/update/3.6.4.RELEASE/e4.4/springsource-tool-suite-3.6.4.RELEASE-e4.4.2-updatesite.zip
我们下载eclipse4.4.2版本spring boot 插件包复制上面【所需插件路径】浏览器回车然后下载即可。
但是,其他的eclipse版本的插件包,怎么弄?
点击官网,找到eclipse版本对应的文件,如下图:
点击zip,然后复制出官网路径如下
http://download.springsource.com/release/STS/3.7.3.RELEASE/dist/e4.5/spring-tool-suite-3.7.3.RELEASE-e4.5.2-win32-x86_64.zip
对照着上面3.7.2版本路径修改一下复制出的4.5.2官网路径中标红地方即可。修改规则:
(1)、STS --> TOOLS/update
(2)、dist 删掉
(3)、spring-tool-suite --> springsource-tool-suite
(4)、win32-x86_64.zip --> updatesite.zip
修改完即可得到4.5.2版本的spring boot 插件包路径(如下):
http://download.springsource.com/release/TOOLS/update/3.7.3.RELEASE/e4.5/springsource-tool-suite-3.7.3.RELEASE-e4.5.2-updatesite.zip
复制路径到浏览器回车即可下载。
那么如果你的eclipse是其他版本的话,我就不一一叙述了啊,自己对照上面步骤拼出路径进行下载即可。现在该讲怎么安装了啊,插件包下载到本地之后,进入到 Eclipse --> Help--> Install new Sofware下
4、在Install new Sofware下安装 下出错了,出错信息为:
An error occurred while collecting items to be installed
session context was:(profile=epp.package.jee, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
No repository found containing: osgi.bundle,com.jcraft.jsch,0.1.54.v20170116-1932
No repository found containing: osgi.bundle,javaewah,1.1.6.v20160919-1400
No repository found containing: osgi.bundle,org.apache.commons.compress,1.15.0.v20180119-1613
No repository found containing: osgi.bundle,org.eclipse.egit,5.1.0.201809111528-r
No repository found containing: osgi.bundle,org.eclipse.egit.core,5.1.0.201809111528-r
No repository found containing: osgi.bundle,org.eclipse.egit.doc,5.1.0.201809111528-r
No repository found containing: osgi.bundle,org.eclipse.egit.mylyn.ui,5.1.0.201809111528-r
No repository found containing: osgi.bundle,org.eclipse.egit.ui,5.1.0.201809111528-r
No repository found containing: osgi.bundle,org.eclipse.jgit,5.1.0.201809111528-r
No repository found containing: osgi.bundle,org.eclipse.jgit.archive,5.1.0.201809111528-r
No repository found containing: osgi.bundle,com.jcraft.jzlib,1.1.1.v201205102305
No repository found containing: osgi.bundle,javax.validation,1.0.0.GA_v201205091237
No repository found containing: org.eclipse.update.feature,org.eclipse.egit,5.1.0.201809111528-r
No repository found containing: org.eclipse.update.feature,org.eclipse.egit.mylyn,5.1.0.201809111528-r
No repository found containing: org.eclipse.update.feature,org.eclipse.jgit,5.1.0.201809111528-r
No repository found containing: osgi.bundle,org.slf4j.impl.log4j12,1.7.2.v20131105-2200
No repository found containing: osgi.bundle,org.springframework.aop,4.3.15.20180306-CI
No repository found containing: osgi.bundle,org.springframework.aop.source,4.3.15.20180306-CI
No repository found containing: osgi.bundle,org.springframework.beans,4.3.15.20180306-CI
No repository found containing: osgi.bundle,org.springframework.beans.source,4.3.15.20180306-CI
No repository found containing: osgi.bundle,org.springframework.context,4.3.15.20180306-CI
No repository found containing: osgi.bundle,org.springframework.context.source,4.3.15.20180306-CI
。。。。。。。。。。。。。。。。
以上通过观察是由于安装spring boot插件时依赖OSGI相关插件,所以先必需安装此插件,安装URL为:http://download.eclipse.org/egit/updates,通过 Eclipse --> Help--> Install new Sofware 正确安装完成后,再重新安装 spring boot插件。提示会重启eclipse,点击yes重启即可
重启之后,我们进入到 Eclipse-->Windows --> Preferences下,会看到有个spring模块,此时就代表,spring boot 插件安装成功。