内容辅助在Eclipse中使用带有'Spring Project Nature'的Java Project的applicationContext.xml中不起作用

ski*_*kip 2 eclipse spring spring-ide

我有一个使用Spring 3和Hibernate 3的简单Java项目.

我使用Spring IDE添加了"Spring Project Nature".applicationContext.xml文件位于项目的src文件夹中.

Eclipse 3.5的Content Assist功能似乎在applicationContext.xml中不起作用:

  • 在bean标记的class属性中,它似乎无法在我的Java Project中找到包和类.
  • 它无法协助任何属性,例如在applicationContext.xml中查找ref属性的现有bean.

lsc*_*hin 9

  1. 项目属性>弹簧> Bean支持>配置集>添加新组(包含所有配置文件).然后再次打开applicationContext.xml.
  2. 如果内容辅助不起作用,请尝试使用Spring Config Editor打开相关文件.
  3. 如果步骤1中的Project Properties> Spring不存在,请安装:

    • SpringSource工具套件:Core/STS> SpringSource工具套件(必需)
    • 如果需要额外的扩展,例如AOP,Autowire,安全.