Spring AOP配置文件引入
使用MyEclipse开发java,我比较喜欢用MyEclispe XML Editor编辑xml文件。曾经用过XmlBuddy(大概是这么个名字吧),感觉他像吹牛~ ~字体很小,提示功能也不十分突出,比MyEclispe XML Editor强的地方是可以自动缩进。所以还是用MyEclispe XML Editor吧。
利用MyEclipse添加Spring2.5的支持库开发AOP的话,虽然引入了AOP的支持包,但是配置文件却不支持AOP配置。Eclipse自动生成的ApplicationContext.xml文件命名空间如下:
<beansxmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:aop="http://www.springframework.org/schema/aop"xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-2.5.xsdhttp://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd"></beans>。
这样Eclipse就支持AOP配置了。配合代码提示键就可以方便开发了。
1 楼 liufuli521 2012-05-27 请问一下%SPRING_HOME%\dist\resources这个在哪啊,我刚开始学不太懂,请多指教 2 楼 somefuture 2012-05-30 liufuli521 写道请问一下%SPRING_HOME%\dist\resources这个在哪啊,我刚开始学不太懂,请多指教
所谓的XXX_home就是XXX所在的目录。你不懂这个就能学到spring,有点超前了。