Skip to content

Commit

Permalink
ref[xml]: <net:config> to <net:net>, <orm:config> to <orm:orm>
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysunxiao committed Jul 3, 2024
1 parent f935aeb commit d8ed791
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
public class NamespaceHandler extends NamespaceHandlerSupport {

private final String NET_TAG = "config";
private final String NET_TAG = "net";

@Override
public void init() {
Expand Down
4 changes: 2 additions & 2 deletions net/src/main/resources/net-1.0.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -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"/>
Expand All @@ -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>
4 changes: 2 additions & 2 deletions net/src/test/resources/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
4 changes: 2 additions & 2 deletions net/src/test/resources/gateway/gateway_client_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
4 changes: 2 additions & 2 deletions net/src/test/resources/gateway/gateway_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"/>
Expand All @@ -29,6 +29,6 @@
<net:consumer consumer="provider1"/>
</net:consumers>

</net:config>
</net:net>

</beans>
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@

<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>

<net:consumers>
<net:consumer load-balancer="cached-consistent-hash" consumer="provider1"/>
</net:consumers>
</net:config>
</net:net>

</beans>
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@

<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>

<net:consumers>
<net:consumer load-balancer="consistent-hash" consumer="provider1"/>
</net:consumers>
</net:config>
</net:net>

</beans>
4 changes: 2 additions & 2 deletions net/src/test/resources/provider/consumer_random_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
<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>

<net:consumers>
<net:consumer load-balancer="random" consumer="provider1"/>
</net:consumers>
</net:config>
</net:net>

</beans>
4 changes: 2 additions & 2 deletions net/src/test/resources/provider/provider_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>

0 comments on commit d8ed791

Please sign in to comment.