The solution to the <mvc:resources/> tag not found in SpringMVC

The solution to the <mvc:resources/> tag not found in SpringMVC

 

In springMVC we often use the <mvc:resources/> tag, but the schema in some editors is too old. Resulting in the <mvc:resources/> tag not being found.

After testing, there are two solutions:

1. Replace the file:

Open window->preferences, enter xml in the input box to find the xml Catalog. Find http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd in the right

This item and click, see the Details below, find the file path and key.

key:http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd

Then we open the URL: http://www.springframework.org/schema/mvc and download the spring-mvc-3.0.xsd file.

Open the file path again: Location: D:\MyEclipse-8.6\configuration\org.eclipse.osgi\bundles\1077\1\.cp\org\springframework\web\servlet\config\spring-mvc-3.0.xsd

Find the file: D:\MyEclipse-8.6\configuration\org.eclipse.osgi\bundles\1077\1\.cp\org\springframework\web\servlet\config below.

Just replace it with the downloaded file. Finally restart myeclipse.

2. The second method:

There will be such code in the spring configuration file:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"  
 xmlns:context="http://www.springframework.org/schema/context"  
 xmlns:p="http://www.springframework.org/schema/p"  
 xmlns:mvc="http://www.springframework.org/schema/mvc"  
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
 xsi:schemaLocation="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.xsd  
      http://www.springframework.org/schema/mvc  
      http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd"> 

Change where http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd "> to

http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd "> can be.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326909423&siteId=291194637