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?

4

1 回答 1

1

“Apache Wink 核心上下文文件”wink-core-context.xml是一个 Spring 配置文件。它是“wink-spring-support”的一部分。

你可以在里面找到apache-wink-1.1.3-incubating-src.zip文件apache-wink-1.1.3-incubating-src\wink-spring-support\src\main\resources\META-INF\server

于 2012-02-07T17:17:26.107 回答