<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.org/config/1.0"
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-2.0.xsd
http://activemq.org/config/1.0
http://activemq.org/config/1.0/1.0.xsd">
红色部分如何配置取决于引入的jar包,比如上面的配置引入的是activemq-all-5.0.0.jar
那么查看activemq-all-5.0.0.jarMETA-INF/spring.schemas最下面记录着:
# resolve remote XSD documents to local classpath schema
http\://activemq.apache.org/schema/activemq-core.xsd = activemq.xsd
http\://activemq.apache.org/schema/activemq-core-5.0.xsd = activemq.xsd# attempt to resolve the namespace URI to a schema if no XSD is mentioned in the doc
# TODO this is EXPERIMENTAL - it might not actually be used!
http\://activemq.org/config/1.0=activemq.xsd
http\://activemq.org/config/1.0/1.0.xsd=activemq.xsd
照抄即可.