我正在使用 spring 集成,我需要包含多个 xsi:schemaLocation。
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:int="http://www.springframework.org/schema/integration"
xmlns:int-sftp="http://www.springframework.org/schema/integration/sftp"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/integration/sftp
http://www.springframework.org/schema/integration/sftp/spring-integration-sftp.xsd">
部署时出现无法加载的错误:
Configuration problem: Failed to import bean definitions from relative location
[spring-beans.xml]
Offending resource: ServletContext resource [/WEB-INF/spring/appServlet/servlet-
context.xml]; nested exception is
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration
problem: Unable to locate Spring NamespaceHandler for XML schema namespace
[http://www.springframework.org/schema/integration/sftp]
Offending resource: ServletContext resource [/WEB-INF/spring/appServlet/spring-
beans.xml]