There are several ways to handle this. The quickest and easiest way is for the name of init parameter to match the name of the WireBox mapping that needs to be injected. Note, WireBox can map not only CFCs, but also constants, settings, java objects web services.
So let's say your init looks like this:
/**
* @fooService.inject fooService
*/
function init( required fooService ) {}
Now, as long as WireBox knows what "fooService" is, it will inject it for you. In fact, I actually think the inject annotation is optional as long as the actual mapping being injected matches the name of the parameter.
Honestly I don't use constructor args, I just stick the properties in my CFC. One benifit is mixin injection automatically puts the dependency in my variables scope for me instead of me need to do this extra legwork in my init
variables.fooService = arguments.fooService
The other way to declare constructor args is in /config/WireBox.cfc with the map().to() DSL. I personally try avoid explicit mappings and like to allow the metadata of my CFCs to speak for itself.
Thanks!
--------- Original Message ---------