java w3c解析xml檔案,獲取指定節點內容,讀取外部配置檔案。
阿新 • • 發佈:2018-11-13
原始碼:
package com.ys.adage.utils; import com.ys.adage.message.CodeObjectResult; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.SAXException; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import java.io.File; import java.io.IOException; import java.util.HashMap; import java.util.Map; /** * Created with IntelliJ IDEA. * Description: * * @author 王飛焱 * Date: 18:31 * Time: 2018/8/29 */ public class ReadDataBaseXml { private static final Logger logger = LoggerFactory.getLogger(ReadDataBaseXml.class); public static Map<String, String> sourceNameMap = new HashMap<String, String>(); public static Map<String, String> getDataBaseInfo(String baseName) { File file = new File(baseName); if (!file.exists()) { new CodeObjectResult("0", "資料庫配置檔案不存在,無法解析!", null); } try { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); Document doc = db.parse(file); Element docEle = doc.getDocumentElement(); NodeList databaseList = docEle.getElementsByTagName("database"); if (databaseList != null && databaseList.getLength() > 0) { for (int i = 0; i < databaseList.getLength(); i++) { Node node = databaseList.item(i); //如果當前節點是元素節點的話 if (node.getNodeType() == Node.ELEMENT_NODE) { Element e = (Element) node; NodeList nodeList = e.getElementsByTagName("source"); NodeList nameList = e.getElementsByTagName("name"); String name = nameList.item(0).getChildNodes().item(0).getNodeValue(); String source = nodeList.item(0).getChildNodes().item(0).getNodeValue(); sourceNameMap.put(name, source); } } } } catch (ParserConfigurationException e) { e.printStackTrace(); } catch (SAXException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } for (String name :sourceNameMap.keySet()){ String value = sourceNameMap.get(name); logger.info(" 資料庫名稱是:" + name + " - 資料來源是:" + value); } return sourceNameMap; } public static void main(String[] args) { getDataBaseInfo("D:\\database.xml"); } }
Xml 配置檔案
<?xml version="1.0"?> <databases> <database> <name>ENMR</name> <source>oracle</source> </database> <database> <name>LIS</name> <source>sqlserver</source> </database> <database> <name>HIS</name> <source>oracle</source> </database> </databases>
執行效果
"C:\Program Files\Java\jdk1.8.0_131\bin\java.exe" "-javaagent:D:\xpf\idea\IntelliJ IDEA 2018.1.6\lib\idea_rt.jar=27855:D:\xpf\idea\IntelliJ IDEA 2018.1.6\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_131\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\rt.jar;D:\wfy\adage\adage-bdservice\target\classes;C:\Users\dcl\.m2\repository\org\springframework\cloud\spring-cloud-starter-eureka-server\1.4.4.RELEASE\spring-cloud-starter-eureka-server-1.4.4.RELEASE.jar;C:\Users\dcl\.m2\repository\org\springframework\cloud\spring-cloud-starter-netflix-eureka-server\1.4.4.RELEASE\spring-cloud-starter-netflix-eureka-server-1.4.4.RELEASE.jar;C:\Users\dcl\.m2\repository\org\springframework\cloud\spring-cloud-starter\1.3.3.RELEASE\spring-cloud-starter-1.3.3.RELEASE.jar;C:\Users\dcl\.m2\repository\org\springframework\cloud\spring-cloud-context\1.3.3.RELEASE\spring-cloud-context-1.3.3.RELEASE.jar;C:\Users\dcl\.m2\repository\org\springframework\security\spring-security-rsa\1.0.3.RELEASE\spring-security-rsa-1.0.3.RELEASE.jar;C:\Users\dcl\.m2\repository\org\bouncycastle\bcpkix-jdk15on\1.55\bcpkix-jdk15on-1.55.jar;C:\Users\dcl\.m2\repository\org\bouncycastle\bcprov-jdk15on\1.55\bcprov-jdk15on-1.55.jar;C:\Users\dcl\.m2\repository\org\springframework\cloud\spring-cloud-netflix-eureka-server\1.4.4.RELEASE\spring-cloud-netflix-eureka-server-1.4.4.RELEASE.jar;C:\Users\dcl\.m2\repository\org\springframework\boot\spring-boot-starter-freemarker\1.5.10.RELEASE\spring-boot-starter-freemarker-1.5.10.RELEASE.jar;C:\Users\dcl\.m2\repository\org\freemarker\freemarker\2.3.27-incubating\freemarker-2.3.27-incubating.jar;C:\Users\dcl\.m2\repository\org\springframework\spring-context-support\4.3.14.RELEASE\spring-context-support-4.3.14.RELEASE.jar;C:\Users\dcl\.m2\repository\org\springframework\cloud\spring-cloud-netflix-eureka-client\1.4.4.RELEASE\spring-cloud-netflix-eureka-client-1.4.4.RELEASE.jar;C:\Users\dcl\.m2\repository\com\netflix\eureka\eureka-client\1.7.2\eureka-client-1.7.2.jar;C:\Users\dcl\.m2\repository\org\codehaus\jettison\jettison\1.3.7\jettison-1.3.7.jar;C:\Users\dcl\.m2\repository\stax\stax-api\1.0.1\stax-api-1.0.1.jar;C:\Users\dcl\.m2\repository\com\netflix\netflix-commons\netflix-eventbus\0.3.0\netflix-eventbus-0.3.0.jar;C:\Users\dcl\.m2\repository\com\netflix\netflix-commons\netflix-infix\0.3.0\netflix-infix-0.3.0.jar;C:\Users\dcl\.m2\repository\commons-jxpath\commons-jxpath\1.3\commons-jxpath-1.3.jar;C:\Users\dcl\.m2\repository\joda-time\joda-time\2.9.9\joda-time-2.9.9.jar;C:\Users\dcl\.m2\repository\org\antlr\antlr-runtime\3.4\antlr-runtime-3.4.jar;C:\Users\dcl\.m2\repository\org\antlr\stringtemplate\3.2.1\stringtemplate-3.2.1.jar;C:\Users\dcl\.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;C:\Users\dcl\.m2\repository\com\google\code\gson\gson\2.8.2\gson-2.8.2.jar;C:\Users\dcl\.m2\repository\org\apache\commons\commons-math\2.2\commons-math-2.2.jar;C:\Users\dcl\.m2\repository\javax\ws\rs\jsr311-api\1.1.1\jsr311-api-1.1.1.jar;C:\Users\dcl\.m2\repository\com\sun\jersey\jersey-core\1.19.1\jersey-core-1.19.1.jar;C:\Users\dcl\.m2\repository\com\sun\jersey\jersey-client\1.19.1\jersey-client-1.19.1.jar;C:\Users\dcl\.m2\repository\com\sun\jersey\contribs\jersey-apache-client4\1.19.1\jersey-apache-client4-1.19.1.jar;C:\Users\dcl\.m2\repository\com\google\inject\guice\4.1.0\guice-4.1.0.jar;C:\Users\dcl\.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;C:\Users\dcl\.m2\repository\com\sun\jersey\jersey-servlet\1.19.1\jersey-servlet-1.19.1.jar;C:\Users\dcl\.m2\repository\com\sun\jersey\jersey-server\1.19.1\jersey-server-1.19.1.jar;C:\Users\dcl\.m2\repository\com\netflix\eureka\eureka-core\1.7.2\eureka-core-1.7.2.jar;C:\Users\dcl\.m2\repository\org\codehaus\woodstox\woodstox-core-asl\4.4.1\woodstox-core-asl-4.4.1.jar;C:\Users\dcl\.m2\repository\javax\xml\stream\stax-api\1.0-2\stax-api-1.0-2.jar;C:\Users\dcl\.m2\repository\com\netflix\archaius\archaius-core\0.7.4\archaius-core-0.7.4.jar;C:\Users\dcl\.m2\repository\com\google\code\findbugs\jsr305\3.0.1\jsr305-3.0.1.jar;C:\Users\dcl\.m2\repository\javax\inject\javax.inject\1\javax.inject-1.jar;C:\Users\dcl\.m2\repository\com\fasterxml\jackson\dataformat\jackson-dataformat-xml\2.8.10\jackson-dataformat-xml-2.8.10.jar;C:\Users\dcl\.m2\repository\com\fasterxml\jackson\module\jackson-module-jaxb-annotations\2.8.10\jackson-module-jaxb-annotations-2.8.10.jar;C:\Users\dcl\.m2\repository\org\codehaus\woodstox\stax2-api\3.1.4\stax2-api-3.1.4.jar;C:\Users\dcl\.m2\repository\com\fasterxml\woodstox\woodstox-core\5.0.3\woodstox-core-5.0.3.jar;C:\Users\dcl\.m2\repository\com\thoughtworks\xstream\xstream\1.4.10\xstream-1.4.10.jar;C:\Users\dcl\.m2\repository\xmlpull\xmlpull\1.1.3.1\xmlpull-1.1.3.1.jar;C:\Users\dcl\.m2\repository\xpp3\xpp3_min\1.1.4c\xpp3_min-1.1.4c.jar;C:\Users\dcl\.m2\repository\org\springframework\cloud\spring-cloud-starter-netflix-archaius\1.4.4.RELEASE\spring-cloud-starter-netflix-archaius-1.4.4.RELEASE.jar;C:\Users\dcl\.m2\repository\commons-configuration\commons-configuration\1.8\commons-configuration-1.8.jar;C:\Users\dcl\.m2\repository\commons-lang\commons-lang\2.6\commons-lang-2.6.jar;C:\Users\dcl\.m2\repository\com\google\guava\guava\18.0\guava-18.0.jar;C:\Users\dcl\.m2\repository\org\springframework\cloud\spring-cloud-starter-netflix-ribbon\1.4.4.RELEASE\spring-cloud-starter-netflix-ribbon-1.4.4.RELEASE.jar;C:\Users\dcl\.m2\repository\com\netflix\ribbon\ribbon\2.2.5\ribbon-2.2.5.jar;C:\Users\dcl\.m2\repository\com\netflix\ribbon\ribbon-transport\2.2.5\ribbon-transport-2.2.5.jar;C:\Users\dcl\.m2\repository\io\reactivex\rxnetty-contexts\0.4.9\rxnetty-contexts-0.4.9.jar;C:\Users\dcl\.m2\repository\io\reactivex\rxnetty-servo\0.4.9\rxnetty-servo-0.4.9.jar;C:\Users\dcl\.m2\repository\io\reactivex\rxnetty\0.4.9\rxnetty-0.4.9.jar;C:\Users\dcl\.m2\repository\io\netty\netty-codec-http\4.0.27.Final\netty-codec-http-4.0.27.Final.jar;C:\Users\dcl\.m2\repository\io\netty\netty-codec\4.0.27.Final\netty-codec-4.0.27.Final.jar;C:\Users\dcl\.m2\repository\io\netty\netty-handler\4.0.27.Final\netty-handler-4.0.27.Final.jar;C:\Users\dcl\.m2\repository\io\netty\netty-transport-native-epoll\4.0.27.Final\netty-transport-native-epoll-4.0.27.Final.jar;C:\Users\dcl\.m2\repository\io\netty\netty-common\4.0.27.Final\netty-common-4.0.27.Final.jar;C:\Users\dcl\.m2\repository\io\netty\netty-buffer\4.0.27.Final\netty-buffer-4.0.27.Final.jar;C:\Users\dcl\.m2\repository\io\netty\netty-transport\4.0.27.Final\netty-transport-4.0.27.Final.jar;C:\Users\dcl\.m2\repository\com\netflix\ribbon\ribbon-core\2.2.5\ribbon-core-2.2.5.jar;C:\Users\dcl\.m2\repository\com\netflix\ribbon\ribbon-httpclient\2.2.5\ribbon-httpclient-2.2.5.jar;C:\Users\dcl\.m2\repository\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar;C:\Users\dcl\.m2\repository\com\netflix\ribbon\ribbon-loadbalancer\2.2.5\ribbon-loadbalancer-2.2.5.jar;C:\Users\dcl\.m2\repository\com\netflix\netflix-commons\netflix-statistics\0.1.1\netflix-statistics-0.1.1.jar;C:\Users\dcl\.m2\repository\io\reactivex\rxjava\1.2.0\rxjava-1.2.0.jar;C:\Users\dcl\.m2\repository\com\netflix\ribbon\ribbon-eureka\2.2.5\ribbon-eureka-2.2.5.jar;C:\Users\dcl\.m2\repository\org\springframework\boot\spring-boot-starter-web\1.5.10.RELEASE\spring-boot-starter-web-1.5.10.RELEASE.jar;C:\Users\dcl\.m2\repository\org\springframework\boot\spring-boot-starter\1.5.10.RELEASE\spring-boot-starter-1.5.10.RELEASE.jar;C:\Users\dcl\.m2\repository\org\springframework\boot\spring-boot\1.5.10.RELEASE\spring-boot-1.5.10.RELEASE.jar;C:\Users\dcl\.m2\repository\org\springframework\boot\spring-boot-autoconfigure\1.5.10.RELEASE\spring-boot-autoconfigure-1.5.10.RELEASE.jar;C:\Users\dcl\.m2\repository\org\springframework\boot\spring-boot-starter-logging\1.5.10.RELEASE\spring-boot-starter-logging-1.5.10.RELEASE.jar;C:\Users\dcl\.m2\repository\ch\qos\logback\logback-classic\1.1.11\logback-classic-1.1.11.jar;C:\Users\dcl\.m2\repository\ch\qos\logback\logback-core\1.1.11\logback-core-1.1.11.jar;C:\Users\dcl\.m2\repository\org\slf4j\jcl-over-slf4j\1.7.25\jcl-over-slf4j-1.7.25.jar;C:\Users\dcl\.m2\repository\org\slf4j\jul-to-slf4j\1.7.25\jul-to-slf4j-1.7.25.jar;C:\Users\dcl\.m2\repository\org\slf4j\log4j-over-slf4j\1.7.25\log4j-over-slf4j-1.7.25.jar;C:\Users\dcl\.m2\repository\org\yaml\snakeyaml\1.17\snakeyaml-1.17.jar;C:\Users\dcl\.m2\repository\org\springframework\boot\spring-boot-starter-tomcat\1.5.10.RELEASE\spring-boot-starter-tomcat-1.5.10.RELEASE.jar;C:\Users\dcl\.m2\repository\org\apache\tomcat\embed\tomcat-embed-core\8.5.27\tomcat-embed-core-8.5.27.jar;C:\Users\dcl\.m2\repository\org\apache\tomcat\tomcat-annotations-api\8.5.27\tomcat-annotations-api-8.5.27.jar;C:\Users\dcl\.m2\repository\org\apache\tomcat\embed\tomcat-embed-el\8.5.27\tomcat-embed-el-8.5.27.jar;C:\Users\dcl\.m2\repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.27\tomcat-embed-websocket-8.5.27.jar;C:\Users\dcl\.m2\repository\org\hibernate\hibernate-validator\5.3.6.Final\hibernate-validator-5.3.6.Final.jar;C:\Users\dcl\.m2\repository\javax\validation\validation-api\1.1.0.Final\validation-api-1.1.0.Final.jar;C:\Users\dcl\.m2\repository\org\jboss\logging\jboss-logging\3.3.1.Final\jboss-logging-3.3.1.Final.jar;C:\Users\dcl\.m2\repository\com\fasterxml\classmate\1.3.4\classmate-1.3.4.jar;C:\Users\dcl\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.8.10\jackson-databind-2.8.10.jar;C:\Users\dcl\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.8.0\jackson-annotations-2.8.0.jar;C:\Users\dcl\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.8.10\jackson-core-2.8.10.jar;C:\Users\dcl\.m2\repository\org\springframework\spring-web\4.3.14.RELEASE\spring-web-4.3.14.RELEASE.jar;C:\Users\dcl\.m2\repository\org\springframework\spring-aop\4.3.14.RELEASE\spring-aop-4.3.14.RELEASE.jar;C:\Users\dcl\.m2\repository\org\springframework\spring-beans\4.3.14.RELEASE\spring-beans-4.3.14.RELEASE.jar;C:\Users\dcl\.m2\repository\org\springframework\spring-context\4.3.14.RELEASE\spring-context-4.3.14.RELEASE.jar;C:\Users\dcl\.m2\repository\org\springframework\spring-webmvc\4.3.14.RELEASE\spring-webmvc-4.3.14.RELEASE.jar;C:\Users\dcl\.m2\repository\org\springframework\spring-expression\4.3.14.RELEASE\spring-expression-4.3.14.RELEASE.jar;C:\Users\dcl\.m2\repository\org\ow2\asm\asm\5.0.3\asm-5.0.3.jar;C:\Users\dcl\.m2\repository\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;C:\Users\dcl\.m2\repository\org\springframework\spring-core\4.3.14.RELEASE\spring-core-4.3.14.RELEASE.jar;C:\Users\dcl\.m2\repository\org\springframework\cloud\spring-cloud-starter-feign\1.4.4.RELEASE\spring-cloud-starter-feign-1.4.4.RELEASE.jar;C:\Users\dcl\.m2\repository\org\springframework\cloud\spring-cloud-starter-openfeign\1.4.4.RELEASE\spring-cloud-starter-openfeign-1.4.4.RELEASE.jar;C:\Users\dcl\.m2\repository\org\springframework\cloud\spring-cloud-netflix-core\1.4.4.RELEASE\spring-cloud-netflix-core-1.4.4.RELEASE.jar;C:\Users\dcl\.m2\repository\org\springframework\cloud\spring-cloud-commons\1.3.3.RELEASE\spring-cloud-commons-1.3.3.RELEASE.jar;C:\Users\dcl\.m2\repository\org\springframework\security\spring-security-crypto\4.2.4.RELEASE\spring-security-crypto-4.2.4.RELEASE.jar;C:\Users\dcl\.m2\repository\org\apache\httpcomponents\httpclient\4.5.5\httpclient-4.5.5.jar;C:\Users\dcl\.m2\repository\org\apache\httpcomponents\httpcore\4.4.9\httpcore-4.4.9.jar;C:\Users\dcl\.m2\repository\commons-codec\commons-codec\1.10\commons-codec-1.10.jar;C:\Users\dcl\.m2\repository\io\github\openfeign\feign-core\9.5.0\feign-core-9.5.0.jar;C:\Users\dcl\.m2\repository\org\jvnet\animal-sniffer-annotation\1.0\animal-sniffer-annotation-1.0.jar;C:\Users\dcl\.m2\repository\io\github\openfeign\feign-slf4j\9.5.0\feign-slf4j-9.5.0.jar;C:\Users\dcl\.m2\repository\io\github\openfeign\feign-hystrix\9.5.0\feign-hystrix-9.5.0.jar;C:\Users\dcl\.m2\repository\com\netflix\hystrix\hystrix-core\1.5.12\hystrix-core-1.5.12.jar;C:\Users\dcl\.m2\repository\org\hdrhistogram\HdrHistogram\2.1.9\HdrHistogram-2.1.9.jar;C:\Users\dcl\.m2\repository\org\springframework\cloud\spring-cloud-starter-zuul\1.4.4.RELEASE\spring-cloud-starter-zuul-1.4.4.RELEASE.jar;C:\Users\dcl\.m2\repository\org\springframework\cloud\spring-cloud-starter-netflix-zuul\1.4.4.RELEASE\spring-cloud-starter-netflix-zuul-1.4.4.RELEASE.jar;C:\Users\dcl\.m2\repository\org\springframework\boot\spring-boot-starter-actuator\1.5.10.RELEASE\spring-boot-starter-actuator-1.5.10.RELEASE.jar;C:\Users\dcl\.m2\repository\org\springframework\boot\spring-boot-actuator\1.5.10.RELEASE\spring-boot-actuator-1.5.10.RELEASE.jar;C:\Users\dcl\.m2\repository\org\springframework\cloud\spring-cloud-starter-netflix-hystrix\1.4.4.RELEASE\spring-cloud-starter-netflix-hystrix-1.4.4.RELEASE.jar;C:\Users\dcl\.m2\repository\com\netflix\hystrix\hystrix-metrics-event-stream\1.5.12\hystrix-metrics-event-stream-1.5.12.jar;C:\Users\dcl\.m2\repository\com\netflix\hystrix\hystrix-serialization\1.5.12\hystrix-serialization-1.5.12.jar;C:\Users\dcl\.m2\repository\com\fasterxml\jackson\module\jackson-module-afterburner\2.8.10\jackson-module-afterburner-2.8.10.jar;C:\Users\dcl\.m2\repository\com\netflix\hystrix\hystrix-javanica\1.5.12\hystrix-javanica-1.5.12.jar;C:\Users\dcl\.m2\repository\org\apache\commons\commons-lang3\3.1\commons-lang3-3.1.jar;C:\Users\dcl\.m2\repository\org\aspectj\aspectjweaver\1.8.13\aspectjweaver-1.8.13.jar;C:\Users\dcl\.m2\repository\com\netflix\zuul\zuul-core\1.3.0\zuul-core-1.3.0.jar;C:\Users\dcl\.m2\repository\commons-io\commons-io\2.4\commons-io-2.4.jar;C:\Users\dcl\.m2\repository\com\netflix\servo\servo-core\0.10.1\servo-core-0.10.1.jar;C:\Users\dcl\.m2\repository\com\netflix\servo\servo-internal\0.10.1\servo-internal-0.10.1.jar;C:\Users\dcl\.m2\repository\com\netflix\netflix-commons\netflix-commons-util\0.1.1\netflix-commons-util-0.1.1.jar;C:\Users\dcl\.m2\repository\org\mybatis\spring\boot\mybatis-spring-boot-starter\1.3.2\mybatis-spring-boot-starter-1.3.2.jar;C:\Users\dcl\.m2\repository\org\springframework\boot\spring-boot-starter-jdbc\1.5.10.RELEASE\spring-boot-starter-jdbc-1.5.10.RELEASE.jar;C:\Users\dcl\.m2\repository\org\apache\tomcat\tomcat-jdbc\8.5.27\tomcat-jdbc-8.5.27.jar;C:\Users\dcl\.m2\repository\org\apache\tomcat\tomcat-juli\8.5.27\tomcat-juli-8.5.27.jar;C:\Users\dcl\.m2\repository\org\springframework\spring-jdbc\4.3.14.RELEASE\spring-jdbc-4.3.14.RELEASE.jar;C:\Users\dcl\.m2\repository\org\springframework\spring-tx\4.3.14.RELEASE\spring-tx-4.3.14.RELEASE.jar;C:\Users\dcl\.m2\repository\org\mybatis\spring\boot\mybatis-spring-boot-autoconfigure\1.3.2\mybatis-spring-boot-autoconfigure-1.3.2.jar;C:\Users\dcl\.m2\repository\org\mybatis\mybatis\3.4.6\mybatis-3.4.6.jar;C:\Users\dcl\.m2\repository\org\mybatis\mybatis-spring\1.3.2\mybatis-spring-1.3.2.jar;C:\Users\dcl\.m2\repository\com\alibaba\druid\1.1.0\druid-1.1.0.jar;C:\Program Files\Java\jdk1.8.0_131\lib\jconsole.jar;C:\Program Files\Java\jdk1.8.0_131\lib\tools.jar;C:\Users\dcl\.m2\repository\mysql\mysql-connector-java\5.1.45\mysql-connector-java-5.1.45.jar" com.ys.adage.utils.ReadDataBaseXml 10:09:18.349 [main] INFO com.ys.adage.utils.ReadDataBaseXml - 資料庫名稱是:HIS - 資料來源是:oracle 10:09:18.355 [main] INFO com.ys.adage.utils.ReadDataBaseXml - 資料庫名稱是:LIS - 資料來源是:sqlserver 10:09:18.355 [main] INFO com.ys.adage.utils.ReadDataBaseXml - 資料庫名稱是:ENMR - 資料來源是:oracle Process finished with exit code 0