XML validation failed in SPRING

0

I'm trying to add a reference to a route but when I add it, I'm missing the validation in the IDE

And he answers this in console:

XML validation started.
Checking file:/home/emendez/NetBeansProjects/HorarioSpring/src/main/webapp/WEB-INF/spring-mvc-servlet.xml...
Referenced entity at "http://www.springframework.org/schema/beans/spring-beans-3.0.xsd".
Referenced entity at "http://www.springframework.org/schema/context/spring-context-3.0.xsd".
Referenced entity at "http://www.springframework.org/schema/tool/spring-tool-3.0.xsd".
El prefijo "mvc" para el elemento "mvc:resources" no está enlazado. [22] 
XML validation finished.

Do you know why it can be?

    
asked by Eduardo 15.03.2018 в 14:57
source

1 answer

0

The prefixes indicate a schema that has been previously loaded, and that defines the XML elements.

In this case, looking for spring mvc schema quickly returns information on what schemes you are missing (eg this page ).

In summary, at xsi:schemaLocation you must add

   xsi:schemaLocation="http://www.springframework.org/schema/beans 
                       http://www.springframework.org/schema/beans/spring-beans.xsd
                       http://www.springframework.org/schema/context 
                       http://www.springframework.org/schema/context/spring-context.xsd
                       http://www.springframework.org/schema/mvc                  <--
                       http://www.springframework.org/schema/mvc/spring-mvc.xsd"> <--
    
answered by 15.03.2018 в 15:08