ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkulichenko <valentin.kuliche...@gmail.com>
Subject Re: Spring Boot Ignite Application - Autowire Services in IgniteCallable
Date Fri, 06 Jan 2017 00:51:39 GMT

Please properly subscribe to the mailing list so that the community can
receive email notifications for your messages. To subscribe, send empty
email to user-subscribe@ignite.apache.org and follow simple instructions in
the reply.

hitendrapratap wrote
> I have Spring Boot Ignite Application as CLIENT - SERVER mode. I have to
> @Autowire some services in IgniteCallable on the server side which will
> have some business logic. What will be the best way to @Autowire those
> services?

I don't think @Autowire will work. However, you can inject the application
context into a callable using special annotation and get any beans from it:

private ApplicationContext appCxt;

@Override public Integer call() throws Exception {
    MyBean myBean = appCxt.getBean("my-bean");


View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Spring-Boot-Ignite-Application-Autowire-Services-in-IgniteCallable-tp9916p9919.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

View raw message