I have a spring dispatcher servlet with servlet-name "spring-mvc". The spring-mvc-servlet.xml appears as follows:
<bean id="viewResolver"
class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass"
value="org.springframework.web.servlet.view.JstlView"/>
<property name="prefix" value="/WEB-INF/jsp/"/>
<property name="suffix" value=".jsp"/>
</bean>
<bean
class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/>
<bean
class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"/>
In a file in WEB-INF/annotation-context.xml I have the annotation scanner defined. All of my annotated classes are loaded and other spring beans are able to load them ok.
However, the path mappings do not work from spring-mvc. If I copy the context-scanner to spring-mvc-servlet.xml, then they work.
Is it possible for spring-mvc-servlet.xml to reference beans defined at the global spring level?
WEB-INF/annotation-context.xml
file do, and what refers to it? – skaffman