我试图创建一个切入点以匹配addViewControllers
接口上的默认WebMvcConfigurer
方法,但仅适用于具有特定批注的WebMvcConfigurer
的实现。
例如对于此类不直接实现方法但具有注释的类。
@MatchThis
public class MyMvC implements WebMvcConfigurer {
...
}
这是注释
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface MatchThis {
}
我尝试了以下操作,但是除非我向MyMvc
添加替代项或删除@within
@Before("@within(MatchThis) && execution(public void * addViewControllers(ViewControllerRegistry))")