<script type="text/javascript"> google_ad_client = "pub-8800625213955058"; /* 336x280, 创建于 07-11-21 */ google_ad_slot = "0989131976"; google_ad_width = 336; google_ad_height = 280; // </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> 这篇文章谈谈如何安装与使用SpringIDE。作为辅助Spring开发的工具,SpringIDE还是比较有用的。 ● 软件配置: · Eclipse 3.1 · SpringIDE 主页:http://springide.org/project/ 当前版本:1.2.1 http://springide.org/updatesite/updatesite_1.2.1.zip · GEF :只需要GEF Runtime就行了,3.1版本的下载地址。 ● 安装: · 解压安装GEF3.1, · 在eclipe中打开 Help ->Software Updates ->Find and install,选择 Search for new features to install. 在打开的界面中,选择new archived site,选择下载的zip文件(如果没有下载这个zip文件,也可以选择New Remote Site,直接从网上更新),再选择一个安装的目录就可以了.
点击Next,在出现的对话框中勾选“updatesite_1.2.1.zip”,然后一直点击Next,直到安装完成。 · 如果有疑问,可以参考http://springide.org/project/wiki/SpringideInstall ● 使用: 这里以前面文章中的SpringHello项目实践一下如何使用SpringIDE。 · 右击SpringHello,在弹出菜单中选择“Add Spring Project Nature”,如下图:
如果成功,则这时该项目就会在右上角挂上了“S”. · 右键项目名,查看其properties,选择“Spring Beans”,切换到“Config Files”,点击“Add”,将包javamxj.spring.beginning3下的bean.xml加入到其中。
· 这时可以看到bean.xml和HelloBean.java的右上角都挂上了“S”。
这是由于SpringIDE分析加载的bean.xml文件,找到了“helloBean”指向的类HelloBean.java。如果找不到这个文件,则会显示一个错误,指明这个类找不到;如果将“helloBean”指向了包javamxj.spring.beginning4下的bean.xml,虽然这个类存在,但由于属性不匹配,同样会显示出错误。这样就验证了XML的配置,可以提前知道配置中的错误。 · Spring Beans view 选中bean.xml,切换到“Navigate” ,如图:
显示图表,如图:





