I'm working with Spring AOP and I'd like to be able to define a pointcut which is triggered whenever a method inside of a package, whose name is defined in a properties file, is called. That is, my pointcut would look something like
@Pointcut("within(${base.packageName}.*)")
public void MyPointCut() {}
and then if my config file had
base.packageName=foo.bar
then at runtime the pointcut would behave like this one
@Pointcut("within(foo.bar.*)")
public void MyPointCut() {}
I've tried several different things (e.g. using SpEL in the pointcut expression, configuring a class implementing the static pointcut interface) but nothing has worked.
Is there any way in spring to define a pointcut based on a value found in a configuration file?