I would like to be able to annotate a class and factory methods with annotations so that the methods can be defined as bean factory methods that are backed by a setting.
For example, in the trace project, multiple pointcuts can be configured in an application, and I would like to be able to annotate a factory method like below, causing a bean to be created for every instance of the pointcut setting.
@SettingBackedBean(setting = "pointcut", beanNameSuffix = "Advisor")
public Advisor createAdvisor(String pointcutExpression, TraceLoggerSettings settings) {
Advisor advisor = null;
.... Code to create advisor based on pointcutExpression (instance of pointcut setting)
return advisor;
}
I would like to be able to annotate a class and factory methods with annotations so that the methods can be defined as bean factory methods that are backed by a setting.
For example, in the trace project, multiple pointcuts can be configured in an application, and I would like to be able to annotate a factory method like below, causing a bean to be created for every instance of the pointcut setting.