How do I inject a Spring bean into Apache Wink?
Asked Answered
F

1

1

How do I inject Spring-managed beans into Apache Wink?

I have a wink application started in web.xml that starts fine if I stub out a dummy data service @Autowired under an interface within it. I have implemented a JPA service to provide the data implementing the same interface, set up via Spring 2.5.6. This works fine in isolation too.

I think I just need to inject my JPA service instead of my dummy service, but I can't figure out how to do that - tried @Service annotations and <context:annotation-driven>; tried manually injecting the JPA service. It's like Wink and Spring aren't aware of each other.

The Wink docs do mention a Spring integration , however this talks about an "Apache Wink core context file" which I can't find mention of elsewhere in the Wink docs.

Anyone got any ideas?

Fidel answered 7/2, 2012 at 17:8 Comment(0)
K
1

The "Apache Wink core context file" wink-core-context.xml is a Spring configuration file. It is part of "wink-spring-support".

You can find the file within apache-wink-1.1.3-incubating-src.zip in apache-wink-1.1.3-incubating-src\wink-spring-support\src\main\resources\META-INF\server

Kitkitchen answered 7/2, 2012 at 17:17 Comment(1)
Cheers pal, hadn't realised that it was a separate library. Palm and face contact imminent.Fidel

© 2022 - 2024 — McMap. All rights reserved.