/ / Spring 3 Interceptors Error: Type Element type "beans" musi być poprzedzony specyfikacją atrybutów ">" lub "/>" - java, xml, spring, spring-mvc, web-applications

Spring 3 Interceptors Error: Type Element type "beans" musi być poprzedzony specyfikacją atrybutów ">" lub "/>" - java, xml, spring, spring-mvc, web-applications

Jestem nowy w Spring 3 MVC i próbuję go wdrożyć Interceptors w przykładzie, podążając za tym adresem URL jako odniesienie:

http://viralpatel.net/blogs/spring-mvc-interceptor-example/

Otrzymuję powyższy błąd w pliku spring-servlet.xml:

<?xml version="1.0" encoding="utf-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<context:annotation-config />
<context:component-scan
base-package="com.spring.controller" />

<mvc:interceptors>
<bean class="com.spring.interceptor.HelloWorldInterceptor" />
</mvc:interceptors>
<bean id="jspViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView" />
<property name="prefix" value="/WEB-INF/jsp/" />

Otrzymuję ten błąd w tej linii:

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

Daj mi znać, jak rozwiązać ten problem.

Odpowiedzi:

0 dla odpowiedzi № 1

Poniższy wątek rozwiązał problem, a tym samym zamknął ten wątek.

Wiosna v3 nie można znaleźć deklaracji dla elementu "mvc: resources"


0 dla odpowiedzi nr 2

Zamknij definicję komponentu bean

  <bean id="jspViewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver"/>