使用没有Spring的AspectJ日志记录 [英] Using AspectJ logging without Spring
问题描述
我刚刚处理了一个日志不好或没有日志的旧应用程序。它没有实现Spring框架。
是否可以在没有Spring的情况下实现AspectJ日志记录功能?
如果是,请向我推荐一些好的教程。
I have just working on an old application which has poor log or no logs. It does not implement Spring framework.
Is it possible to implement AspectJ logging functionality without Spring?
If yes please suggest me some good tutorials.
推荐答案
尝试此链接以显示一个简单的应用程序,显示使用加载时间编织而不使用Spring
http://ganeshghag.blogspot.in/2012/10/demystifying-aop-getting-started-with.html
try this link for a simple application showing use of Load time weaving without using Spring http://ganeshghag.blogspot.in/2012/10/demystifying-aop-getting-started-with.html
所有需要的是aspectj运行时和weaver jar,以及包含正确配置的META-INF\aop.xml文件。
all that would be needed is aspectj runtime and weaver jars, and a META-INF\aop.xml file containing proper config.
还可以参考链接了解详情关于使用没有弹簧的aspectj ltw
http://www.eclipse.org/aspectj/ doc / next / devguide / ltw.html
also refer link for details about using aspectj ltw without spring http://www.eclipse.org/aspectj/doc/next/devguide/ltw.html
这篇关于使用没有Spring的AspectJ日志记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!