Skip to content

Latest commit

 

History

History
12 lines (7 loc) · 593 Bytes

aspect-registration.md

File metadata and controls

12 lines (7 loc) · 593 Bytes

Aspect Registration

Now that we have built our aspect we need to register it with WireBox so it knows about it and all DI can be performed in it. Let's open our WireBox binder and use the following DSL method:

  • mapAspect(aspect,autoBinding=[true])
mapAspect("MethodLogger").to("model.aspects.MethodLogger");

This tells WireBox to register a new aspect called MethodLogger that points to the CFC model.aspects.MethodLogger that I have just built. WireBox will then mark that object as an aspect, create it once the injector loads and have it ready for building.