[ColdBox4] Wirebox-AOP // DSL Injection

I am having an issue where I’m trying to mapAspect in wirebox.cfc

during the construction of the aspect, its trying to inject the DSL but the system can’t seem to find it.

property name=“sessionStorage” inject=“id:sessionStorage@cbstorages”;

I use this exact inject in many other places in the framework but for some reason in the aspect, its throwing an error.

Could this be because the module isn’t loaded when the aspect is created? if so, any work-arounds?

Yes, WireBox config is processed before modules are loaded. It’s an annoying chicken/egg problem.

You can map the aspects programmatically via an afterConfigurationLoad interceptor or just delay the creation of the model with a provider.

property name=“sessionStorage” inject=“provider:id:sessionStorage@cbstorages”;

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com