如何在JSTL中使用AOP?
我想要 JSP 文件(Spring 3.0)中的 AOP 顾问,
即 JSP 中 我的名字是 ${value.name}
我认为它可能会调用 value.getName() 方法.. 所以我像下面一样设置AOP...
@Around("execution(public java.lang.String a.b.c.*..get*())")
public Object changeStr(ProceedingJoinPoint p) throws throwable
{
...
}
但它没有被调用...
如何在JSTL中使用AOP?
I wanna AOP advisor in JSP file (Spring 3.0)
i.e..in JSP
My name is ${value.name}
I think that it might call value.getName() method..
So I set AOP like below...
@Around("execution(public java.lang.String a.b.c.*..get*())")
public Object changeStr(ProceedingJoinPoint p) throws throwable
{
...
}
but it wasn't call...
How to use AOP in JSTL?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
AFAIK 表达式语言(JSTL 使用 Java EL)使用反射,所以恕我直言,问题应该是:如何通过反射使用 AOP?这是一篇关于 JBoss AOP 和 Reflection 的文章: http://docs.jboss.org/jbossaop/docs/2.0.0.GA/docs/aspect-framework/reference/en/html/reflection.html
AFAIK expression languages (JSTL uses Java EL) use reflection, so IMHO the question should be: How to use AOP with reflection?. Here's an article on JBoss AOP and Reflection: http://docs.jboss.org/jbossaop/docs/2.0.0.GA/docs/aspect-framework/reference/en/html/reflection.html