[coldbox-3.1.0] - Issues with wirebox injection

I have no locations setup in my wirebox conf

:slight_smile:

Ok… updated my ModuleConfig.cfc to the following mappings

binder.map(“PillarDAO@green10”).to(“epsys.modules.green10.model.PillarDAO”)
.asSingleton();

binder.map(“PillarService@green10”).to(“epsys.modules.green10.model.PillarService”)
.initArg(name=“PillarDAO”,DSL=“PillarDAO@green10”)
.asSingleton();

binder.map(“PillarServiceTester”).to(“epsys.modules.green10.model.PillarService”)
.initArg(name=“PillarDAO”,DSL=“PillarDAO@green10”)
.asSingleton();

Still getting the issue… its strange that the PillarServiceTester works fine .

Only the same name mapping breaks with the argument missing error.

How are you injecting it, did you change it too

property name = ‘pillarService’ inject=‘PillarService@green10’;

It sounds like you may not have done this last step.

IT WORKS!

thanks so much

I am now going to digest how we fixed this… and make sure I understand the injection process within modules

Thanks SO much!

Very Happy!

:slight_smile:

yeah, I think when you do

property name=’’ inject=’’;

It first looks for the name of the component, then the DSL name. As they are named the same, it looks like it was always picking up the name of the componet. By adding the @modulename in both locations your forcing it to look for the DSL name.

I am guessing that is the issue you had.

I assume by DSL name you meen my mapping name?

thanks

That’s correct.

Thanks again!

You’re welcome