Have been playing around with AOP in ContentBox, in one of my modules. When I wrote a simple one based on the docs, I have no issue seeing the logs that it logs. If I do something like this in the moduleConfig.
binder.mapAspect(“cronusLogger”).to("#moduleMapping#.aop.cronusLoggingAOP");
binder.bindAspect(classes=binder.match().any(),
methods=binder.match().annotatedWith(“cronusLogger”),
aspects=“cronusLogger”);
However, I noticed that you can also do the binding with annotations. Except the following doesn’t work, if I remove the bindAspect from the moduleConfig component and just try to use the following as from the docs.
/**
-
@classMatcher any
-
@methodMatcher annotatedWith:cronusLogger
*/
component implements=“coldbox.system.aop.MethodInterceptor” {
}
I am at a loss to explain this, and have double checked the annotations and don’t see anything wrong.