Hi Carlo,
Just wire the spring bean like you would do with any other bean. Notice
you're almost on your own when implementing IAuthorizationStrategy (it
doesn't extend nothing else).
I did it with @Autowired annotation to inject a bean annotated with @Service
in its class, with Spring using context:component-scan for discovering
beans, and autowiring by name.
Cheers !
2009/11/5 Carlo Camerino <
carlo.camerino@...>
> Hi,
>
> we created an implementation of IAuthorizationStrategy class.
> However, we need to access a spring managed object within that class?
> How do I get it to use a spring bean?
> @SpringBean annotation wouldn't work because it is not an instance of
> a Component.
>
> public class SampleAuthorizationStrategy implements IAuthorizationStrategy
> {
>
> ( we want to inject a spring bean into this)
> private HelloWorldService helloWorldService;
> }
>
>
>
> Thanks A Lot
> Carlo
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
users-unsubscribe@...
> For additional commands, e-mail:
users-help@...
>
>
--
"To err is human; to make real mess, you need a computer."