简体   繁体   中英

Spring MVC returning XmlBeanDefinitionStoreException when trying to use mvc:resources or mvc:default-servlet-handler

I just started to study Spring using the 3.0.0 RELEASE version, and when I declare the tag mvc:resources or mvc:default-servlet-handler the server returns the XmlBeanDefinitionStoreException, telling me that it couldn't find the tag's reference.

Does somebody know how to solve this?

Thanks!

Well, after some work I discovered the answer for my question. Inside the header os the spring-context.xml I opened the url link http://www.springframework.org/schema/mvc and then selected the spring-mvc-3.0.xsd file, in this case this link .

After use the browser's search for default-servlet-handler , I've found it's declaration in the file, and saw that the class that was needed for this tag was org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler .

I found some references in the web, telling that this class was implemented in the Spring 3.0.5, and I was using 3.0.0. So, I've downloaded the right version of the framework, replaced it in my classpath, and everything worked right.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM