我在 applicationContext.xml 中使用了 .dtd,但现在我想使用 Spring 的基于注释的 AOP。我被告知要在我的 applicationContext.xml 中添加一个。
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<aop:aspectj-autoproxy />
...
但是发生了一些错误。该文件似乎无法识别 aop 节点,所以我认为我应该再导入一个 .dtd 文件,我发现:
<!DOCTYPE aspectj PUBLIC
"-//AspectJ//DTD//EN" "http://www.eclipse.org/aspectj/dtd/aspectj.dtd">
但我可以同时使用 .dtd 吗?如何?
谢谢