When I deployed to the sample project spring-hibernate-1.0 to tomcat 6.0.18,
the catalina.out always shows that
...
2009-08-16 20:33:32,934 ERROR
[org.springframework.web.servlet.DispatcherServlet] - Context initialization
failed
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'annotationUrlMapping' defined in ServletContext resource
[/WEB-INF/sprhib-servlet.xml]: Cannot resolve reference to bean
'currentUserInterceptor' while setting bean property 'interceptors'; nested
exception is
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
named 'currentUserInterceptor' is defined
...
I checked the sprhib-servlet.xml, it seems because it only defines
<!-- Enable annotation-based controllers using @Controller annotations
-->
<bean id="annotationUrlMapping"
class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping">
<property name="interceptors" ref="currentUserInterceptor"/>
</bean>
There is no bean definition of curentUserInterceptor. But I do not know how
to fix this problem because as I understand that it seemingly needs to add a
method e.g. setCurrentUSerInterceptor to bean annotationUrlMapping; however,
that bean is provided by spring.
How can I fix this problem so that I can run this exapmple correctly?
env: debian/ kernel 2.6.30/ java 1.6.0_10/ tomcat 6.0.18/ shiro version is
using trunk at http://svn.apache.org/repos/asf/incubator/shiro/trunk/
Thanks for help.
--
View this message in context:
http://n2.nabble.com/No-bean-named-%27currentUserInterceptor%27-is-defined-tp3453538p3453538.html
Sent from the Shiro User mailing list archive at Nabble.com.