eclipse 中配置spring

1. 安装Eclipse3.7
 
    推荐使用:Eclipse Classic版本
 
    下载地址:http://www.eclipse.org/downloads/或http://download.eclipse.org/eclipse/downloads/
 
2. 安装SpringIDE
 
    如果要支持可视化操作需先安装:http://download.eclipse.org/tools/ajdt/37/update/
 
    SpringIDE更新地址:http://dist.springsource.com/release/TOOLS/update/e3.7
 
    安装选择:Spring IDE core,Spring IDE AOP extension,Spring IDE OSGi extension,
 
    Spring IDE AJDT integration
 
3. Configuring the Target Platform
 
3.1 Configuration without Spring IDE Support
 
    (1)临时创建一个目录:TargetPlatform,推荐在该目录下在新建一级目录bundles, 将SpringDM所需要的JAR以
 
    及所需要的依赖JAR均放置在 该目录 下;
 
    (2) 在Eclipse中选择Window>Preference>Plug-in Development>Target Platform>Add>Noting:Start
 
    whith an enpty target defination>Next>Add>Directory>Browse至具体包含Bundle的目录;
 
    (3) 激活该Target:Target下的Defination对当前的Workspace只能有一个是Active的,选择新建的Checkbox
 
    选择Apply。
 
3.2 Using SpringIDE Support for the Target Platfomr
 
    在Eclipse中选择Window>Preference>
 
    Plugin Development>TargetPlatform>Add>Template:Spring Dynamic Modules for OSGi(tm)
 
    Service Platform 1.1.2,Eclipse将自动识别出本软件自带的相关的JAR Bundle组件。
 
3.3 激活SpringIDE支持该工程
 
    右击项目名称,在上下文菜单中选择"Spring Tools","Add Spring Project Nature"。
 
4. 开发
 
    (1) 创建SpringDM配置文件:
 
    New > Others > Spring > Spring Bean Configuration File, 输入File Name:osgi-context.xml;
 
    (2) 多个Spring 配置文件中代码自动完成设置:项目名称右击,选择Properties>Spring>BeanSupport
 
    >Config Set
 
    (3) Web Component组件开发
 
    需在MANIFEST.MF中增加:Bundle-ClassPath;
 
    需将Output目录改成:ProjectName/classes。
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值