Ich bin neu im Frühling. Eine Sache, die mich verwirrt, ist, dass ich manchmal XML-Konfigurationsdateien mit versionierten Schemas sehe, manchmal aber auch mit nicht versionierten. Zum Beispiel sehe ich manchmal so etwas
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.0.xsd">
<context:annotation-config/>
<context:component-scan base-package="base.package"/>
</beans>
Und manchmal so:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd">
<context:annotation-config/>
<context:component-scan base-package="base.package"/>
</beans>
Beachten Sie, dass die Schemata spring-beansund spring-contextin den beiden Beispielen unterschiedlich sind.
Meine Frage ist also, welchen Stil würden Sie verwenden und warum? Wird das versionierte Schema in Zukunft nicht mehr verfügbar sein und wird das nicht versionierte Schema mit einer aktuellen Anwendung kompatibel bleiben, wenn Spring das Schema aktualisiert?
Eine Nebenfrage ist, wo finde ich eine Liste der versionierten Federschemata?
Danke vielmals!
