एक स्प्रिंग XML कॉन्फ़िगरेशन फ़ाइल में स्प्रिंग एकता का उपयोग करने के लिए, मैं si
नाम स्थान घोषित करने की जरूरत है, और XML स्कीमा स्कीमा स्थान प्रदान करते हैं:वसंत एकीकरण में कई एक्सएमएल स्कीमा क्यों हैं, और मुझे किस का उपयोग करना चाहिए?
<?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:int="http://www.springframework.org/schema/integration"
xsi:schemaLocation="http://www.springframework.org/schema/integration
http://www.springframework.org/schema/integration/spring-integration.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
हालांकि, डॉक्स के अनुसार, वहाँ के लिए दो स्कीमा हैं से चुनें:
सेअब से, उपयोगकर्ताओं को हमेशा नवीनतम एक्सएमएल स्कीमा (वर्तमान में संस्करण 2.1) घोषित करना होगा। वैकल्पिक रूप से, वे संस्करण-कम स्कीमा का उपयोग कर सकते हैं। आम तौर पर, सबसे अच्छा विकल्प संस्करण-कम नामस्थानों का उपयोग करना है, क्योंकि ये स्वचालित रूप से स्प्रिंग एकीकरण के नवीनतम उपलब्ध संस्करण का उपयोग करेंगे।
: http://static.springsource.org/spring-integration/reference/htmlsingle/#2.1-schema-updated
क्यों दोनों spring-integration.xsd
और spring-integration-2.1.xsd
है? मैंने दोनों की जांच की, और उत्तरार्द्ध पूर्व के रूप में लगभग तीन गुना बड़ा है।
तो दस्तावेज़ क्यों कहते हैं कि संस्करण-कम स्कीमा का उपयोग करना बेहतर है? एक या दूसरे का उपयोग करने के क्या परिणाम हैं? या यह सिर्फ एक बग है कि spring-integration.xsd
और spring-integration-2.1.xsd
अलग हैं?