posted 11 years ago
Hi all:
In my new project, we need to program many existing projects to intercept some action method in order to add some extra work, mainly synchronize the modified data into another db. We just need an advice but tens of pointcut, maybe over 100, from different existing projects. I want to configure the action and method info in a xml file, and then apply them as pointcut through some way. The configuration info is like below, just temporary thought.
My question is that besides a customized advisor extending StaticMethodMatcherPointcutAdvisor and implementing the method match throung the way of , such as storing the action and method names in a List and determining by List.contains(), is there an other easy and efficient way ? Such as @aspectj and aspectj schema. At least I haven't found a good way, cause it's horrible to write a very long pointcut expression in the applicationContext.xml, there're too many methods and actions to write, and it's hard to read and maintain all these pointcut expression. It's better not to import other jar file beside spring library.