After How to insert Spring bean in Apache Wink?
Now I am using support under spring -support, and I thought I configured everything correctly.
web.xml includes:
<context-param> <param-name>contextConfigLocation</param-name> <param-value> classpath:META-INF/wink/wink-core-context.xml classpath:applicationContext.xml </param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <servlet> <servlet-name>restServlet</servlet-name> <servlet-class>org.apache.wink.server.internal.servlet.RestServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>restServlet</servlet-name> <url-pattern>/rest/*</url-pattern> </servlet-mapping>
META-INF / wink / wink-core-context.xml contains:
<bean class="org.apache.wink.spring.Registrar"> <property name="instances"> <set> <ref bean="myservice" /> </set> </property> </bean> <bean id="myservice" class="mystuff.ServiceImpl"/>
mystuff.ServiceImpl has an @Autowired annotation that introduces other Spring stuff, and mystuff.ServiceImpl implements the JAX-RS annotated interface and itself includes the JAX-RS @Path("/services") .
I see Spring loading this stuff just fine, including the myservice bean. However, when I request my resources, I get 404 not found. When Wink starts up, I see a couple of log entries that may indicate a problem:
applicationConfigLocation property was not defined
Using application classes null named in init-param applicationConfigLocation
Did I miss something? Any tips?
source share