ref[xml]: <net:config> to <net:net>, <orm:config> to <orm:orm>

This commit is contained in:
godotg
2024-07-03 11:20:13 +08:00
parent f935aebfb7
commit d8ed791bfd
9 changed files with 17 additions and 17 deletions
@@ -20,7 +20,7 @@ import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
*/
public class NamespaceHandler extends NamespaceHandlerSupport {
private final String NET_TAG = "config";
private final String NET_TAG = "net";
@Override
public void init() {
+2 -2
View File
@@ -49,7 +49,7 @@
<xsd:attribute name="consumer" type="xsd:string" use="required"/>
</xsd:complexType>
<xsd:complexType name="configType">
<xsd:complexType name="netType">
<xsd:sequence>
<xsd:choice minOccurs="0" maxOccurs="1">
<xsd:element name="registry" type="addressType"/>
@@ -73,7 +73,7 @@
<xsd:attribute name="protocol-param" type="xsd:string"/>
</xsd:complexType>
<xsd:element name="config" type="configType"/>
<xsd:element name="net" type="netType"/>
</xsd:schema>
+2 -2
View File
@@ -18,7 +18,7 @@
<context:component-scan base-package="com.zfoo"/>
<net:config id="applicationNameTest" protocol-location="protocol.xml">
</net:config>
<net:net id="applicationNameTest" protocol-location="protocol.xml">
</net:net>
</beans>
@@ -18,7 +18,7 @@
<context:component-scan base-package="com.zfoo"/>
<net:config id="applicationNameTest" protocol-location="protocol.xml">
</net:config>
<net:net id="applicationNameTest" protocol-location="protocol.xml">
</net:net>
</beans>
@@ -18,7 +18,7 @@
<context:component-scan base-package="com.zfoo"/>
<net:config id="applicationNameTest" protocol-location="protocol.xml">
<net:net id="applicationNameTest" protocol-location="protocol.xml">
<net:registry center="zookeeper" user="" password="">
<net:address name="firstZookeeper" url="127.0.0.1:2181"/>
@@ -29,6 +29,6 @@
<net:consumer consumer="provider1"/>
</net:consumers>
</net:config>
</net:net>
</beans>
@@ -19,7 +19,7 @@
<context:component-scan base-package="com.zfoo"/>
<net:config id="applicationNameTest" protocol-location="protocol.xml">
<net:net id="applicationNameTest" protocol-location="protocol.xml">
<net:registry center="${registry.center}" user="${registry.user}" password="${registry.password}">
<net:address name="${registry.address.name}" url="${registry.address.url}"/>
</net:registry>
@@ -27,6 +27,6 @@
<net:consumers>
<net:consumer load-balancer="cached-consistent-hash" consumer="provider1"/>
</net:consumers>
</net:config>
</net:net>
</beans>
@@ -19,7 +19,7 @@
<context:component-scan base-package="com.zfoo"/>
<net:config id="applicationNameTest" protocol-location="protocol.xml">
<net:net id="applicationNameTest" protocol-location="protocol.xml">
<net:registry center="${registry.center}" user="${registry.user}" password="${registry.password}">
<net:address name="${registry.address.name}" url="${registry.address.url}"/>
</net:registry>
@@ -27,6 +27,6 @@
<net:consumers>
<net:consumer load-balancer="consistent-hash" consumer="provider1"/>
</net:consumers>
</net:config>
</net:net>
</beans>
@@ -18,7 +18,7 @@
<context:property-placeholder location="classpath:deploy-dev.properties"/>
<context:component-scan base-package="com.zfoo"/>
<net:config id="applicationNameTest" protocol-location="protocol.xml">
<net:net id="applicationNameTest" protocol-location="protocol.xml">
<net:registry center="${registry.center}" user="${registry.user}" password="${registry.password}">
<net:address name="${registry.address.name}" url="${registry.address.url}"/>
</net:registry>
@@ -26,6 +26,6 @@
<net:consumers>
<net:consumer load-balancer="random" consumer="provider1"/>
</net:consumers>
</net:config>
</net:net>
</beans>
@@ -19,7 +19,7 @@
<context:component-scan base-package="com.zfoo"/>
<net:config id="applicationNameTest" protocol-location="protocol.xml">
<net:net id="applicationNameTest" protocol-location="protocol.xml">
<net:registry center="${registry.center}" user="${registry.user}" password="${registry.password}">
<net:address name="${registry.address.name}" url="${registry.address.url}"/>
</net:registry>
@@ -33,6 +33,6 @@
<net:provider protocol-module="myProviderModule" provider="provider4"/>
<net:provider protocol-module="myProviderModule" provider="provider5"/>
</net:providers>
</net:config>
</net:net>
</beans>