mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-20 00:15:55 +00:00
feat[net]: support xml configuration
This commit is contained in:
1 parent
7aff4e7b72
commit
3b90504c02
3 files changed
+5
-1
No files matched your search
@@ -89,14 +89,16 @@ public class RegistryConfig {
|
|||||||
}
|
}
|
||||||
RegistryConfig that = (RegistryConfig) o;
|
RegistryConfig that = (RegistryConfig) o;
|
||||||
return Objects.equals(center, that.center) &&
|
return Objects.equals(center, that.center) &&
|
||||||
|
Objects.equals(path, that.path) &&
|
||||||
Objects.equals(user, that.user) &&
|
Objects.equals(user, that.user) &&
|
||||||
Objects.equals(password, that.password) &&
|
Objects.equals(password, that.password) &&
|
||||||
|
Objects.equals(driverClassName, that.driverClassName) &&
|
||||||
Objects.equals(address, that.address);
|
Objects.equals(address, that.address);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(center, user, password, address);
|
return Objects.hash(center, user, password, address, path, driverClassName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDriverClassName() {
|
public String getDriverClassName() {
|
||||||
|
|||||||
@@ -152,6 +152,7 @@ public class NetDefinitionParser implements BeanDefinitionParser {
|
|||||||
resolvePlaceholder("path", "path", builder, element, parserContext);
|
resolvePlaceholder("path", "path", builder, element, parserContext);
|
||||||
resolvePlaceholder("user", "user", builder, element, parserContext);
|
resolvePlaceholder("user", "user", builder, element, parserContext);
|
||||||
resolvePlaceholder("password", "password", builder, element, parserContext);
|
resolvePlaceholder("password", "password", builder, element, parserContext);
|
||||||
|
resolvePlaceholder("driver-class-name", "driverClassName", builder, element, parserContext);
|
||||||
var addressMap = parseAddress(element, parserContext);
|
var addressMap = parseAddress(element, parserContext);
|
||||||
builder.addPropertyValue("address", addressMap);
|
builder.addPropertyValue("address", addressMap);
|
||||||
parserContext.getRegistry().registerBeanDefinition(clazz.getCanonicalName(), builder.getBeanDefinition());
|
parserContext.getRegistry().registerBeanDefinition(clazz.getCanonicalName(), builder.getBeanDefinition());
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
<xsd:attribute name="path" type="xsd:string" use="optional"/>
|
<xsd:attribute name="path" type="xsd:string" use="optional"/>
|
||||||
<xsd:attribute name="user" type="xsd:string" use="required"/>
|
<xsd:attribute name="user" type="xsd:string" use="required"/>
|
||||||
<xsd:attribute name="password" type="xsd:string" use="required"/>
|
<xsd:attribute name="password" type="xsd:string" use="required"/>
|
||||||
|
<xsd:attribute name="driver-class-name" type="xsd:string" use="optional"/>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
|
|
||||||
<xsd:complexType name="providersType">
|
<xsd:complexType name="providersType">
|
||||||
|
|||||||
Reference in new issue
Block a user