In eclipse, sometimes in an XML file, especially in a spring-related configuration file, there are compile errors that do not affect the normal operation of the program, such as:
Referenced file contains errors (http://www.springframework.org/schema/beans/spring-beans-4.0.xsd).
You can resolve this compilation error by following these steps:
1. The version of spring is changed, but the Eclipse compiler still uses the previously cached spring-beans-**.xsd file. The reason is
For the Eclipse compiler, there is a cache that caches these profiles, so that the validation will tell you that the version is not uniform.
The workaround is to empty the files and force eclipse to reload the files.
1) Preferences-> General-> Network Connections Cache
Select the response file ill Click Delete or click Delete all.
2) If it is Maven project, right click on the project and select Maven, select Update Project.
3) If both of these steps are not working, you can close project and reopen Force Eclipse for compilation.
2. The current version of the spring version and configuration file are configured differently, causing files such as XSD to not be loaded correctly and changed to current versions.
If not successful, repeat above 2) 3) two steps.
3. When using spring, use more than one configuration file, so the configuration in the header must be unified.
If not successful, repeat above 2) 3) two steps.