I’m trying to inject my security service into an interceptor:
`
component extends=“coldbox.system.Interceptor” {
// DI
property name=“securityService” inject=“SecurityService@area51”;
public void function preProcess( event, interceptData ){
var rc = event.getCollection(private = false);
}
}
`
But I got this error:
The DSL Definition {REF={null}, REQUIRED={true}, ARGNAME={}, DSL={id:cookieStorage@cbstorages}, JAVACAST={null}, NAME={cookieStorage}, TYPE={any}, VALUE={null}, SCOPE={variables}} did not produce any resulting dependency
Detail The target requesting the dependency is: ‘SecurityService@area51’
Stacktrace The Error Occurred in
E:\wamp\www\TropicalSeo\app\coldbox\system\ioc\Builder.cfc: line 380
378: throw(message=“The DSL Definition #arguments.definition.toString()# did not produce any resulting dependency”,
379: detail=“The target requesting the dependency is: ‘#arguments.targetID#’”,
380: type=“Builder.DSLDependencyNotFoundException”);
381: }
382: // else return void, no dependency found that was required
called from E:\wamp\www\TropicalSeo\app\coldbox\system\ioc\Injector.cfc: line 603
called from E:\wamp\www\TropicalSeo\app\coldbox\system\ioc\Injector.cfc: line 490
called from E:\wamp\www\TropicalSeo\app\coldbox\system\ioc\scopes\Singleton.cfc: line 57
called from E:\wamp\www\TropicalSeo\app\coldbox\system\ioc\Injector.cfc: line 261
called from E:\wamp\www\TropicalSeo\app\coldbox\system\ioc\Builder.cfc: line 471
called from E:\wamp\www\TropicalSeo\app\coldbox\system\ioc\Builder.cfc: line 362
called from E:\wamp\www\TropicalSeo\app\coldbox\system\ioc\Injector.cfc: line 603
called from E:\wamp\www\TropicalSeo\app\coldbox\system\ioc\Injector.cfc: line 490
called from E:\wamp\www\TropicalSeo\app\coldbox\system\ioc\scopes\Singleton.cfc: line 57
called from E:\wamp\www\TropicalSeo\app\coldbox\system\ioc\Injector.cfc: line 261
called from E:\wamp\www\TropicalSeo\app\coldbox\system\web\services\InterceptorService.cfc: line 254
called from E:\wamp\www\TropicalSeo\app\coldbox\system\web\services\InterceptorService.cfc: line 195
called from E:\wamp\www\TropicalSeo\app\coldbox\system\web\services\InterceptorService.cfc: line 107
called from E:\wamp\www\TropicalSeo\app\coldbox\system\web\services\InterceptorService.cfc: line 75
called from E:\wamp\www\TropicalSeo\app\coldbox\system\web\services\LoaderService.cfc: line 53
called from E:\wamp\www\TropicalSeo\app\coldbox\system\Bootstrap.cfc: line 71
called from E:\wamp\www\TropicalSeo\app\coldbox\system\Bootstrap.cfc: line 107
called from E:\wamp\www\TropicalSeo\app\coldbox\system\Bootstrap.cfc: line 350
called from E:\wamp\www\TropicalSeo\app\Application.cfc: line 57
So how can I access my security service into interceptor?