/ / Spring Framework legado no mapeamento de esquema carregado - java, spring

Esquema Legacy Spring Framework no mapeamento de esquema carregado - java, spring

Em um aplicativo baseado no Spring Framework 3.2 que estou revisando, notei que o Spring "s PluggableSchemaResolver produz um mapeamento em tempo de execução que inclui muitos esquemas herdados do Spring. Abreviando para maior clareza:

w.sf.o/s/ means www.springframwork.org/schemas/

e

o/sf/    means org.springframework

Aqui está a lista completa:

http://w.sf.o/s/aop/spring-aop-2.0.xsd o/sf/aop/config/spring-aop-2.0.xsd
http://w.sf.o/s/aop/spring-aop-2.5.xsd o/sf/aop/config/spring-aop-2.5.xsd
http://w.sf.o/s/aop/spring-aop-3.0.xsd o/sf/aop/config/spring-aop-3.0.xsd
http://w.sf.o/s/aop/spring-aop-3.1.xsd o/sf/aop/config/spring-aop-3.1.xsd
http://w.sf.o/s/aop/spring-aop-3.2.xsd o/sf/aop/config/spring-aop-3.2.xsd
http://w.sf.o/s/aop/spring-aop.xsd o/sf/aop/config/spring-aop-3.2.xsd
http://w.sf.o/s/beans/spring-beans-2.0.xsd o/sf/beans/factory/xml/spring-beans-2.0.xsd
http://w.sf.o/s/beans/spring-beans-2.5.xsd o/sf/beans/factory/xml/spring-beans-2.5.xsd
http://w.sf.o/s/beans/spring-beans-3.0.xsd o/sf/beans/factory/xml/spring-beans-3.0.xsd
http://w.sf.o/s/beans/spring-beans-3.1.xsd o/sf/beans/factory/xml/spring-beans-3.1.xsd
http://w.sf.o/s/beans/spring-beans-3.2.xsd o/sf/beans/factory/xml/spring-beans-3.2.xsd
http://w.sf.o/s/beans/spring-beans.xsd o/sf/beans/factory/xml/spring-beans-3.2.xsd
http://w.sf.o/s/cache/spring-cache-3.1.xsd o/sf/cache/config/spring-cache-3.1.xsd
http://w.sf.o/s/cache/spring-cache-3.2.xsd o/sf/cache/config/spring-cache-3.2.xsd
http://w.sf.o/s/cache/spring-cache.xsd o/sf/cache/config/spring-cache-3.2.xsd
http://w.sf.o/s/context/spring-context-2.5.xsd o/sf/context/config/spring-context-2.5.xsd
http://w.sf.o/s/context/spring-context-3.0.xsd o/sf/context/config/spring-context-3.0.xsd
http://w.sf.o/s/context/spring-context-3.1.xsd o/sf/context/config/spring-context-3.1.xsd
http://w.sf.o/s/context/spring-context-3.2.xsd o/sf/context/config/spring-context-3.2.xsd
http://w.sf.o/s/context/spring-context.xsd o/sf/context/config/spring-context-3.2.xsd
http://w.sf.o/s/jdbc/spring-jdbc-3.0.xsd o/sf/jdbc/config/spring-jdbc-3.0.xsd
http://w.sf.o/s/jdbc/spring-jdbc-3.1.xsd o/sf/jdbc/config/spring-jdbc-3.1.xsd
http://w.sf.o/s/jdbc/spring-jdbc-3.2.xsd o/sf/jdbc/config/spring-jdbc-3.2.xsd
http://w.sf.o/s/jdbc/spring-jdbc.xsd o/sf/jdbc/config/spring-jdbc-3.2.xsd
http://w.sf.o/s/jee/spring-jee-2.0.xsd o/sf/ejb/config/spring-jee-2.0.xsd
http://w.sf.o/s/jee/spring-jee-2.5.xsd o/sf/ejb/config/spring-jee-2.5.xsd
http://w.sf.o/s/jee/spring-jee-3.0.xsd o/sf/ejb/config/spring-jee-3.0.xsd
http://w.sf.o/s/jee/spring-jee-3.1.xsd o/sf/ejb/config/spring-jee-3.1.xsd
http://w.sf.o/s/jee/spring-jee-3.2.xsd o/sf/ejb/config/spring-jee-3.2.xsd
http://w.sf.o/s/jee/spring-jee.xsd o/sf/ejb/config/spring-jee-3.2.xsd
http://w.sf.o/s/lang/spring-lang-2.0.xsd o/sf/scripting/config/spring-lang-2.0.xsd
http://w.sf.o/s/lang/spring-lang-2.5.xsd o/sf/scripting/config/spring-lang-2.5.xsd
http://w.sf.o/s/lang/spring-lang-3.0.xsd o/sf/scripting/config/spring-lang-3.0.xsd
http://w.sf.o/s/lang/spring-lang-3.1.xsd o/sf/scripting/config/spring-lang-3.1.xsd
http://w.sf.o/s/lang/spring-lang-3.2.xsd o/sf/scripting/config/spring-lang-3.2.xsd
http://w.sf.o/s/lang/spring-lang.xsd o/sf/scripting/config/spring-lang-3.2.xsd
http://w.sf.o/s/mvc/spring-mvc-3.0.xsd o/sf/web/servlet/config/spring-mvc-3.0.xsd
http://w.sf.o/s/mvc/spring-mvc-3.1.xsd o/sf/web/servlet/config/spring-mvc-3.1.xsd
http://w.sf.o/s/mvc/spring-mvc-3.2.xsd o/sf/web/servlet/config/spring-mvc-3.2.xsd
http://w.sf.o/s/mvc/spring-mvc.xsd o/sf/web/servlet/config/spring-mvc-3.2.xsd
http://w.sf.o/s/task/spring-task-3.0.xsd o/sf/scheduling/config/spring-task-3.0.xsd
http://w.sf.o/s/task/spring-task-3.1.xsd o/sf/scheduling/config/spring-task-3.1.xsd
http://w.sf.o/s/task/spring-task-3.2.xsd o/sf/scheduling/config/spring-task-3.2.xsd
http://w.sf.o/s/task/spring-task.xsd o/sf/scheduling/config/spring-task-3.2.xsd
http://w.sf.o/s/tool/spring-tool-2.0.xsd o/sf/beans/factory/xml/spring-tool-2.0.xsd
http://w.sf.o/s/tool/spring-tool-2.5.xsd o/sf/beans/factory/xml/spring-tool-2.5.xsd
http://w.sf.o/s/tool/spring-tool-3.0.xsd o/sf/beans/factory/xml/spring-tool-3.0.xsd
http://w.sf.o/s/tool/spring-tool-3.1.xsd o/sf/beans/factory/xml/spring-tool-3.1.xsd
http://w.sf.o/s/tool/spring-tool-3.2.xsd o/sf/beans/factory/xml/spring-tool-3.2.xsd
http://w.sf.o/s/tool/spring-tool.xsd o/sf/beans/factory/xml/spring-tool-3.2.xsd
http://w.sf.o/s/tx/spring-tx-2.0.xsd o/sf/transaction/config/spring-tx-2.0.xsd
http://w.sf.o/s/tx/spring-tx-2.5.xsd o/sf/transaction/config/spring-tx-2.5.xsd
http://w.sf.o/s/tx/spring-tx-3.0.xsd o/sf/transaction/config/spring-tx-3.0.xsd
http://w.sf.o/s/tx/spring-tx-3.1.xsd o/sf/transaction/config/spring-tx-3.1.xsd
http://w.sf.o/s/tx/spring-tx-3.2.xsd o/sf/transaction/config/spring-tx-3.2.xsd
http://w.sf.o/s/tx/spring-tx.xsd o/sf/transaction/config/spring-tx-3.2.xsd
http://w.sf.o/s/util/spring-util-2.0.xsd o/sf/beans/factory/xml/spring-util-2.0.xsd
http://w.sf.o/s/util/spring-util-2.5.xsd o/sf/beans/factory/xml/spring-util-2.5.xsd
http://w.sf.o/s/util/spring-util-3.0.xsd o/sf/beans/factory/xml/spring-util-3.0.xsd
http://w.sf.o/s/util/spring-util-3.1.xsd o/sf/beans/factory/xml/spring-util-3.1.xsd
http://w.sf.o/s/util/spring-util-3.2.xsd o/sf/beans/factory/xml/spring-util-3.2.xsd
http://w.sf.o/s/util/spring-util.xsd o/sf/beans/factory/xml/spring-util-3.2.xsd

Criando meu próprio spring.schemas e spring.handlers arquivos com apenas definições do Spring 3.2 não reduziram esse conjunto de mapeamento.

É normal que o Spring tenha mapeamentos herdados em tempo de execução?

Respostas:

1 para resposta № 1

Sim; é normal. Cada JAR do Spring, por exemplo, spring-tx-3.2.14.RELEASE.jar, contém um META-INF/spring.schemas que contém mapeamentos para todas as versões suportadas do Spring; em spring-tx-3.2.jar, a spring.schemas contém:

http://www.springframework.org/schema/tx/spring-tx-2.0.xsd=org/springframework/transaction/config/spring-tx-2.0.xsd
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd=org/springframework/transaction/config/spring-tx-2.5.xsd
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd
http://www.springframework.org/schema/tx/spring-tx-3.1.xsd=org/springframework/transaction/config/spring-tx-3.1.xsd
http://www.springframework.org/schema/tx/spring-tx-3.2.xsd=org/springframework/transaction/config/spring-tx-3.2.xsd
http://www.springframework.org/schema/tx/spring-tx.xsd=org/springframework/transaction/config/spring-tx-3.2.xsd

Basta compartilhar depois de passar um tempo pensando e, posteriormente, revisando o código fonte e os JARs gerados para encontrar a resposta.