具有Spring方面的编译时代码检测的Ant目标 [英] Ant target for compile-time code instrumentation with Spring aspects

查看:109
本文介绍了具有Spring方面的编译时代码检测的Ant目标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用Netbeans 6.7和Ant开发了一个Web应用程序.该webapp可以运行,但是我想重构代码以使用@Configurable Spring批注来进行更清洁的依赖注入.

I have developed a web application using Netbeans 6.7 and Ant. The webapp works, but I would like to refactor the code to use @Configurable Spring annotation for cleaner dependency injection.

我能够使Spring方面的加载时编织(LTW)间歇地工作(请参见

I was able to get load-time weaving (LTW) of Spring aspects to work intermittently (see http://forum.springsource.org/showthread.php?t=86904).

在这一点上,我想对我的工具集使用编译时编织.

At this point I would like to use compile-time weaving with my tool set.

有人可以提供一个我可以用来在编译时编织Spring方面的Ant目标吗?

Could anybody provide an Ant target that I can use to weave Spring aspects at compile time?

任何解释了如何在代码编译后立即配置Netbeans以执行新的Ant目标的人,都将获得额外的荣誉.

An extra credit will be given to anybody who explains how to configure Netbeans to execute the new Ant target right after code compilation.

谢谢.

推荐答案

<iajc outjar="demo.jar">
    <sourceroots>
        <pathelement location="src" />
        <pathelement location=".." />
    </sourceroots>
    <aspectpath>
        <pathelement location="org.springframework.aspects-3.0.0.RC1.jar" />
    </aspectpath>
</iajc>

有关完整示例,请参见AspectJ开发指南

For a full example, see the AspectJ development guide iajc sample.

这篇关于具有Spring方面的编译时代码检测的Ant目标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆