(三) 架構搭建-項目基礎框架啓動

先總結下問題:

1、模擬啓動子服務異常-子服務是工具服務

模擬器的測試類

先啓動zkServer.cmd

需要的包

"C:\Program Files\Java\jdk1.7.0_80\bin\java" "-javaagent:E:\KF\IntelliJ IDEA 2017.1\lib\idea_rt.jar=54798:E:\KF\IntelliJ IDEA 2017.1\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.7.0_80\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.7.0_80\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.7.0_80\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.7.0_80\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.7.0_80\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.7.0_80\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.7.0_80\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.7.0_80\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.7.0_80\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.7.0_80\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.7.0_80\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.7.0_80\jre\lib\jce.jar;C:\Program Files\Java\jdk1.7.0_80\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.7.0_80\jre\lib\jfxrt.jar;C:\Program Files\Java\jdk1.7.0_80\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.7.0_80\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.7.0_80\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.7.0_80\jre\lib\resources.jar;C:\Program Files\Java\jdk1.7.0_80\jre\lib\rt.jar;G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\test-classes;G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes;C:\Users\Administrator\.m2\repository\redis\clients\jedis\2.5.1\jedis-2.5.1.jar;C:\Users\Administrator\.m2\repository\org\apache\commons\commons-pool2\2.0\commons-pool2-2.0.jar;C:\Users\Administrator\.m2\repository\commons-net\commons-net\3.3\commons-net-3.3.jar;C:\Users\Administrator\.m2\repository\org\jsoup\jsoup\1.7.2\jsoup-1.7.2.jar;C:\Users\Administrator\.m2\repository\org\slf4j\slf4j-log4j12\1.7.7\slf4j-log4j12-1.7.7.jar;C:\Users\Administrator\.m2\repository\org\slf4j\slf4j-api\1.7.7\slf4j-api-1.7.7.jar;C:\Users\Administrator\.m2\repository\log4j\log4j\1.2.17\log4j-1.2.17.jar;C:\Users\Administrator\.m2\repository\javax\javaee-api\7.0\javaee-api-7.0.jar;C:\Users\Administrator\.m2\repository\com\sun\mail\javax.mail\1.5.0\javax.mail-1.5.0.jar;C:\Users\Administrator\.m2\repository\javax\activation\activation\1.1\activation-1.1.jar;C:\Users\Administrator\.m2\repository\org\apache\httpcomponents\httpcore\4.4.6\httpcore-4.4.6.jar;C:\Users\Administrator\.m2\repository\org\apache\httpcomponents\httpclient\4.3.3\httpclient-4.3.3.jar;C:\Users\Administrator\.m2\repository\commons-logging\commons-logging\1.1.3\commons-logging-1.1.3.jar;C:\Users\Administrator\.m2\repository\org\codehaus\jackson\jackson-mapper-asl\1.9.13\jackson-mapper-asl-1.9.13.jar;C:\Users\Administrator\.m2\repository\org\codehaus\jackson\jackson-core-asl\1.9.13\jackson-core-asl-1.9.13.jar;C:\Users\Administrator\.m2\repository\net\sf\json-lib\json-lib\2.4\json-lib-2.4-jdk15.jar;C:\Users\Administrator\.m2\repository\commons-beanutils\commons-beanutils\1.8.0\commons-beanutils-1.8.0.jar;C:\Users\Administrator\.m2\repository\commons-collections\commons-collections\3.2.1\commons-collections-3.2.1.jar;C:\Users\Administrator\.m2\repository\commons-lang\commons-lang\2.5\commons-lang-2.5.jar;C:\Users\Administrator\.m2\repository\net\sf\ezmorph\ezmorph\1.0.6\ezmorph-1.0.6.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-core\4.0.2.RELEASE\spring-core-4.0.2.RELEASE.jar;C:\Users\Administrator\.m2\repository\com\alibaba\fastjson\1.1.41\fastjson-1.1.41.jar;C:\Users\Administrator\.m2\repository\org\apache\commons\commons-lang3\3.4\commons-lang3-3.4.jar;C:\Users\Administrator\.m2\repository\commons-httpclient\commons-httpclient\3.1\commons-httpclient-3.1.jar;C:\Users\Administrator\.m2\repository\commons-codec\commons-codec\1.10\commons-codec-1.10.jar;C:\Users\Administrator\.m2\repository\commons-io\commons-io\2.4\commons-io-2.4.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-beans\4.0.2.RELEASE\spring-beans-4.0.2.RELEASE.jar;C:\Users\Administrator\.m2\repository\com\alibaba\dubbo\2.5.3\dubbo-2.5.3.jar;C:\Users\Administrator\.m2\repository\org\javassist\javassist\3.15.0-GA\javassist-3.15.0-GA.jar;C:\Users\Administrator\.m2\repository\org\jboss\netty\netty\3.2.5.Final\netty-3.2.5.Final.jar;C:\Users\Administrator\.m2\repository\org\apache\zookeeper\zookeeper\3.4.9\zookeeper-3.4.9.jar;C:\Users\Administrator\.m2\repository\jline\jline\0.9.94\jline-0.9.94.jar;C:\Users\Administrator\.m2\repository\io\netty\netty\3.10.5.Final\netty-3.10.5.Final.jar;C:\Users\Administrator\.m2\repository\com\101tec\zkclient\0.10\zkclient-0.10.jar;C:\Users\Administrator\.m2\repository\javax\servlet\servlet-api\2.5\servlet-api-2.5.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-jms\4.0.2.RELEASE\spring-jms-4.0.2.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-aop\4.0.2.RELEASE\spring-aop-4.0.2.RELEASE.jar;C:\Users\Administrator\.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-context\4.0.2.RELEASE\spring-context-4.0.2.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-expression\4.0.2.RELEASE\spring-expression-4.0.2.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-tx\4.0.2.RELEASE\spring-tx-4.0.2.RELEASE.jar" ConfigDubboProvider
2018-10-26 10:31:44,113: org.springframework.core.env.MutablePropertySources.addLast(MutablePropertySources.java:110) [DEBUG] - Adding [systemProperties] PropertySource with lowest search precedence
2018-10-26 10:31:44,122: org.springframework.core.env.MutablePropertySources.addLast(MutablePropertySources.java:110) [DEBUG] - Adding [systemEnvironment] PropertySource with lowest search precedence
2018-10-26 10:31:44,123: org.springframework.core.env.AbstractEnvironment.<init>(AbstractEnvironment.java:126) [DEBUG] - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
2018-10-26 10:31:44,128: org.springframework.context.support.AbstractApplicationContext.prepareRefresh(AbstractApplicationContext.java:513) [INFO] - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@7141cf63: startup date [Fri Oct 26 10:31:44 GMT+08:00 2018]; root of context hierarchy
2018-10-26 10:31:44,194: org.springframework.core.env.MutablePropertySources.addLast(MutablePropertySources.java:110) [DEBUG] - Adding [systemProperties] PropertySource with lowest search precedence
2018-10-26 10:31:44,195: org.springframework.core.env.MutablePropertySources.addLast(MutablePropertySources.java:110) [DEBUG] - Adding [systemEnvironment] PropertySource with lowest search precedence
2018-10-26 10:31:44,195: org.springframework.core.env.AbstractEnvironment.<init>(AbstractEnvironment.java:126) [DEBUG] - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
2018-10-26 10:31:44,215: org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:316) [INFO] - Loading XML bean definitions from URL [file:/G:/ibc-svn/private/HelloWorld/HelloWorldRoot/HelloWorldConfig/target/classes/spring-mvc-config.xml]
2018-10-26 10:31:44,239: org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:73) [DEBUG] - Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl]
2018-10-26 10:31:44,296: org.springframework.beans.factory.xml.PluggableSchemaResolver.getSchemaMappings(PluggableSchemaResolver.java:141) [DEBUG] - Loading schema mappings from [META-INF/spring.schemas]
2018-10-26 10:31:44,306: org.springframework.beans.factory.xml.PluggableSchemaResolver.getSchemaMappings(PluggableSchemaResolver.java:147) [DEBUG] - Loaded schema mappings: {http://code.alibabatech.com/schema/dubbo/dubbo.xsd=META-INF/dubbo.xsd, http://www.springframework.org/schema/jee/spring-jee-3.2.xsd=org/springframework/ejb/config/spring-jee-3.2.xsd, http://www.springframework.org/schema/util/spring-util.xsd=org/springframework/beans/factory/xml/spring-util-4.0.xsd, http://www.springframework.org/schema/jms/spring-jms-4.0.xsd=org/springframework/jms/config/spring-jms-4.0.xsd, http://www.springframework.org/schema/jms/spring-jms-3.0.xsd=org/springframework/jms/config/spring-jms-3.0.xsd, http://www.springframework.org/schema/task/spring-task.xsd=org/springframework/scheduling/config/spring-task-4.0.xsd, http://www.springframework.org/schema/beans/spring-beans-3.1.xsd=org/springframework/beans/factory/xml/spring-beans-3.1.xsd, http://www.springframework.org/schema/cache/spring-cache.xsd=org/springframework/cache/config/spring-cache-4.0.xsd, http://www.springframework.org/schema/aop/spring-aop-3.0.xsd=org/springframework/aop/config/spring-aop-3.0.xsd, http://www.springframework.org/schema/task/spring-task-3.1.xsd=org/springframework/scheduling/config/spring-task-3.1.xsd, http://www.springframework.org/schema/aop/spring-aop-2.0.xsd=org/springframework/aop/config/spring-aop-2.0.xsd, http://www.springframework.org/schema/aop/spring-aop-4.0.xsd=org/springframework/aop/config/spring-aop-4.0.xsd, http://www.springframework.org/schema/tool/spring-tool-2.5.xsd=org/springframework/beans/factory/xml/spring-tool-2.5.xsd, http://www.springframework.org/schema/beans/spring-beans.xsd=org/springframework/beans/factory/xml/spring-beans-4.0.xsd, http://www.springframework.org/schema/jee/spring-jee-2.5.xsd=org/springframework/ejb/config/spring-jee-2.5.xsd, http://www.springframework.org/schema/tool/spring-tool-3.1.xsd=org/springframework/beans/factory/xml/spring-tool-3.1.xsd, http://www.springframework.org/schema/jee/spring-jee-3.1.xsd=org/springframework/ejb/config/spring-jee-3.1.xsd, http://www.springframework.org/schema/aop/spring-aop.xsd=org/springframework/aop/config/spring-aop-4.0.xsd, http://www.springframework.org/schema/tx/spring-tx-3.2.xsd=org/springframework/transaction/config/spring-tx-3.2.xsd, http://www.springframework.org/schema/context/spring-context-3.2.xsd=org/springframework/context/config/spring-context-3.2.xsd, http://www.springframework.org/schema/beans/spring-beans-2.0.xsd=org/springframework/beans/factory/xml/spring-beans-2.0.xsd, http://www.springframework.org/schema/util/spring-util-3.2.xsd=org/springframework/beans/factory/xml/spring-util-3.2.xsd, http://www.springframework.org/schema/lang/spring-lang-3.2.xsd=org/springframework/scripting/config/spring-lang-3.2.xsd, http://www.springframework.org/schema/beans/spring-beans-4.0.xsd=org/springframework/beans/factory/xml/spring-beans-4.0.xsd, http://www.springframework.org/schema/beans/spring-beans-3.0.xsd=org/springframework/beans/factory/xml/spring-beans-3.0.xsd, http://www.springframework.org/schema/cache/spring-cache-3.2.xsd=org/springframework/cache/config/spring-cache-3.2.xsd, http://www.springframework.org/schema/task/spring-task-3.0.xsd=org/springframework/scheduling/config/spring-task-3.0.xsd, http://www.springframework.org/schema/task/spring-task-4.0.xsd=org/springframework/scheduling/config/spring-task-4.0.xsd, http://www.springframework.org/schema/tx/spring-tx-2.5.xsd=org/springframework/transaction/config/spring-tx-2.5.xsd, http://www.springframework.org/schema/context/spring-context-2.5.xsd=org/springframework/context/config/spring-context-2.5.xsd, http://www.springframework.org/schema/tool/spring-tool-3.0.xsd=org/springframework/beans/factory/xml/spring-tool-3.0.xsd, http://www.springframework.org/schema/jms/spring-jms-3.2.xsd=org/springframework/jms/config/spring-jms-3.2.xsd, http://www.springframework.org/schema/tx/spring-tx.xsd=org/springframework/transaction/config/spring-tx-4.0.xsd, http://www.springframework.org/schema/lang/spring-lang.xsd=org/springframework/scripting/config/spring-lang-4.0.xsd, http://www.springframework.org/schema/tool/spring-tool-2.0.xsd=org/springframework/beans/factory/xml/spring-tool-2.0.xsd, http://www.springframework.org/schema/util/spring-util-2.5.xsd=org/springframework/beans/factory/xml/spring-util-2.5.xsd, http://www.springframework.org/schema/lang/spring-lang-2.5.xsd=org/springframework/scripting/config/spring-lang-2.5.xsd, http://www.springframework.org/schema/tool/spring-tool-4.0.xsd=org/springframework/beans/factory/xml/spring-tool-4.0.xsd, http://www.springframework.org/schema/aop/spring-aop-3.2.xsd=org/springframework/aop/config/spring-aop-3.2.xsd, http://www.springframework.org/schema/jee/spring-jee-3.0.xsd=org/springframework/ejb/config/spring-jee-3.0.xsd, http://www.springframework.org/schema/tx/spring-tx-3.1.xsd=org/springframework/transaction/config/spring-tx-3.1.xsd, http://www.springframework.org/schema/jee/spring-jee-2.0.xsd=org/springframework/ejb/config/spring-jee-2.0.xsd, http://www.springframework.org/schema/context/spring-context-3.1.xsd=org/springframework/context/config/spring-context-3.1.xsd, http://www.springframework.org/schema/jee/spring-jee-4.0.xsd=org/springframework/ejb/config/spring-jee-4.0.xsd, http://www.springframework.org/schema/util/spring-util-3.1.xsd=org/springframework/beans/factory/xml/spring-util-3.1.xsd, http://www.springframework.org/schema/lang/spring-lang-3.1.xsd=org/springframework/scripting/config/spring-lang-3.1.xsd, http://www.springframework.org/schema/cache/spring-cache-3.1.xsd=org/springframework/cache/config/spring-cache-3.1.xsd, http://www.springframework.org/schema/context/spring-context.xsd=org/springframework/context/config/spring-context-4.0.xsd, http://www.springframework.org/schema/jee/spring-jee.xsd=org/springframework/ejb/config/spring-jee-4.0.xsd, http://www.springframework.org/schema/jms/spring-jms-2.5.xsd=org/springframework/jms/config/spring-jms-2.5.xsd, http://www.springframework.org/schema/jms/spring-jms.xsd=org/springframework/jms/config/spring-jms-4.0.xsd, http://www.springframework.org/schema/aop/spring-aop-2.5.xsd=org/springframework/aop/config/spring-aop-2.5.xsd, http://www.springframework.org/schema/jms/spring-jms-3.1.xsd=org/springframework/jms/config/spring-jms-3.1.xsd, http://www.springframework.org/schema/beans/spring-beans-3.2.xsd=org/springframework/beans/factory/xml/spring-beans-3.2.xsd, http://www.springframework.org/schema/tx/spring-tx-2.0.xsd=org/springframework/transaction/config/spring-tx-2.0.xsd, http://www.springframework.org/schema/aop/spring-aop-3.1.xsd=org/springframework/aop/config/spring-aop-3.1.xsd, http://www.springframework.org/schema/tx/spring-tx-4.0.xsd=org/springframework/transaction/config/spring-tx-4.0.xsd, http://www.springframework.org/schema/task/spring-task-3.2.xsd=org/springframework/scheduling/config/spring-task-3.2.xsd, http://www.springframework.org/schema/context/spring-context-4.0.xsd=org/springframework/context/config/spring-context-4.0.xsd, http://www.springframework.org/schema/tx/spring-tx-3.0.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd, http://www.springframework.org/schema/context/spring-context-3.0.xsd=org/springframework/context/config/spring-context-3.0.xsd, http://www.springframework.org/schema/tool/spring-tool.xsd=org/springframework/beans/factory/xml/spring-tool-4.0.xsd, http://www.springframework.org/schema/util/spring-util-3.0.xsd=org/springframework/beans/factory/xml/spring-util-3.0.xsd, http://www.springframework.org/schema/lang/spring-lang-3.0.xsd=org/springframework/scripting/config/spring-lang-3.0.xsd, http://www.springframework.org/schema/util/spring-util-2.0.xsd=org/springframework/beans/factory/xml/spring-util-2.0.xsd, http://www.springframework.org/schema/cache/spring-cache-4.0.xsd=org/springframework/cache/config/spring-cache-4.0.xsd, http://www.springframework.org/schema/lang/spring-lang-2.0.xsd=org/springframework/scripting/config/spring-lang-2.0.xsd, http://www.springframework.org/schema/util/spring-util-4.0.xsd=org/springframework/beans/factory/xml/spring-util-4.0.xsd, http://www.springframework.org/schema/lang/spring-lang-4.0.xsd=org/springframework/scripting/config/spring-lang-4.0.xsd, http://www.springframework.org/schema/tool/spring-tool-3.2.xsd=org/springframework/beans/factory/xml/spring-tool-3.2.xsd, http://www.springframework.org/schema/beans/spring-beans-2.5.xsd=org/springframework/beans/factory/xml/spring-beans-2.5.xsd}
2018-10-26 10:31:44,310: org.springframework.beans.factory.xml.PluggableSchemaResolver.resolveEntity(PluggableSchemaResolver.java:119) [DEBUG] - Found XML schema [http://www.springframework.org/schema/beans/spring-beans-3.1.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-3.1.xsd
2018-10-26 10:31:44,365: org.springframework.beans.factory.xml.PluggableSchemaResolver.resolveEntity(PluggableSchemaResolver.java:119) [DEBUG] - Found XML schema [http://www.springframework.org/schema/context/spring-context-3.1.xsd] in classpath: org/springframework/context/config/spring-context-3.1.xsd
2018-10-26 10:31:44,376: org.springframework.beans.factory.xml.PluggableSchemaResolver.resolveEntity(PluggableSchemaResolver.java:119) [DEBUG] - Found XML schema [http://www.springframework.org/schema/tool/spring-tool-3.1.xsd] in classpath: org/springframework/beans/factory/xml/spring-tool-3.1.xsd
2018-10-26 10:31:44,641: org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:108) [DEBUG] - Loading bean definitions
2018-10-26 10:31:44,660: org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.getHandlerMappings(DefaultNamespaceHandlerResolver.java:157) [DEBUG] - Loaded NamespaceHandler mappings: {http://www.springframework.org/schema/p=org.springframework.beans.factory.xml.SimplePropertyNamespaceHandler, http://www.springframework.org/schema/util=org.springframework.beans.factory.xml.UtilNamespaceHandler, http://code.alibabatech.com/schema/dubbo=com.alibaba.dubbo.config.spring.schema.DubboNamespaceHandler, http://www.springframework.org/schema/jee=org.springframework.ejb.config.JeeNamespaceHandler, http://www.springframework.org/schema/aop=org.springframework.aop.config.AopNamespaceHandler, http://www.springframework.org/schema/cache=org.springframework.cache.config.CacheNamespaceHandler, http://www.springframework.org/schema/c=org.springframework.beans.factory.xml.SimpleConstructorNamespaceHandler, http://www.springframework.org/schema/tx=org.springframework.transaction.config.TxNamespaceHandler, http://www.springframework.org/schema/task=org.springframework.scheduling.config.TaskNamespaceHandler, http://www.springframework.org/schema/lang=org.springframework.scripting.config.LangNamespaceHandler, http://www.springframework.org/schema/jms=org.springframework.jms.config.JmsNamespaceHandler, http://www.springframework.org/schema/context=org.springframework.context.config.ContextNamespaceHandler}
2018-10-26 10:31:44,688: org.springframework.core.env.MutablePropertySources.addLast(MutablePropertySources.java:110) [DEBUG] - Adding [systemProperties] PropertySource with lowest search precedence
2018-10-26 10:31:44,688: org.springframework.core.env.MutablePropertySources.addLast(MutablePropertySources.java:110) [DEBUG] - Adding [systemEnvironment] PropertySource with lowest search precedence
2018-10-26 10:31:44,688: org.springframework.core.env.AbstractEnvironment.<init>(AbstractEnvironment.java:126) [DEBUG] - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
2018-10-26 10:31:44,731: org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.registerDefaultFilters(ClassPathScanningCandidateComponentProvider.java:242) [DEBUG] - JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning
2018-10-26 10:31:44,734: org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.registerDefaultFilters(ClassPathScanningCandidateComponentProvider.java:250) [DEBUG] - JSR-330 'javax.inject.Named' annotation found and supported for component scanning
2018-10-26 10:31:44,739: org.springframework.core.io.support.PathMatchingResourcePatternResolver.doFindMatchingFileSystemResources(PathMatchingResourcePatternResolver.java:553) [DEBUG] - Looking for matching resources in directory tree [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc]
2018-10-26 10:31:44,739: org.springframework.core.io.support.PathMatchingResourcePatternResolver.doRetrieveMatchingFiles(PathMatchingResourcePatternResolver.java:615) [DEBUG] - Searching directory [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc] for files matching pattern [G:/ibc-svn/private/HelloWorld/HelloWorldRoot/HelloWorldConfig/target/classes/com/ibc/**/*.class]
2018-10-26 10:31:44,742: org.springframework.core.io.support.PathMatchingResourcePatternResolver.doRetrieveMatchingFiles(PathMatchingResourcePatternResolver.java:615) [DEBUG] - Searching directory [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config] for files matching pattern [G:/ibc-svn/private/HelloWorld/HelloWorldRoot/HelloWorldConfig/target/classes/com/ibc/**/*.class]
2018-10-26 10:31:44,742: org.springframework.core.io.support.PathMatchingResourcePatternResolver.doRetrieveMatchingFiles(PathMatchingResourcePatternResolver.java:615) [DEBUG] - Searching directory [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\config] for files matching pattern [G:/ibc-svn/private/HelloWorld/HelloWorldRoot/HelloWorldConfig/target/classes/com/ibc/**/*.class]
2018-10-26 10:31:44,743: org.springframework.core.io.support.PathMatchingResourcePatternResolver.doRetrieveMatchingFiles(PathMatchingResourcePatternResolver.java:615) [DEBUG] - Searching directory [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\config\properties] for files matching pattern [G:/ibc-svn/private/HelloWorld/HelloWorldRoot/HelloWorldConfig/target/classes/com/ibc/**/*.class]
2018-10-26 10:31:44,745: org.springframework.core.io.support.PathMatchingResourcePatternResolver.doRetrieveMatchingFiles(PathMatchingResourcePatternResolver.java:615) [DEBUG] - Searching directory [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils] for files matching pattern [G:/ibc-svn/private/HelloWorld/HelloWorldRoot/HelloWorldConfig/target/classes/com/ibc/**/*.class]
2018-10-26 10:31:44,746: org.springframework.core.io.support.PathMatchingResourcePatternResolver.doRetrieveMatchingFiles(PathMatchingResourcePatternResolver.java:615) [DEBUG] - Searching directory [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\encryption] for files matching pattern [G:/ibc-svn/private/HelloWorld/HelloWorldRoot/HelloWorldConfig/target/classes/com/ibc/**/*.class]
2018-10-26 10:31:44,747: org.springframework.core.io.support.PathMatchingResourcePatternResolver.doRetrieveMatchingFiles(PathMatchingResourcePatternResolver.java:615) [DEBUG] - Searching directory [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\exceptions] for files matching pattern [G:/ibc-svn/private/HelloWorld/HelloWorldRoot/HelloWorldConfig/target/classes/com/ibc/**/*.class]
2018-10-26 10:31:44,840: org.springframework.core.io.support.PathMatchingResourcePatternResolver.doRetrieveMatchingFiles(PathMatchingResourcePatternResolver.java:615) [DEBUG] - Searching directory [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\format] for files matching pattern [G:/ibc-svn/private/HelloWorld/HelloWorldRoot/HelloWorldConfig/target/classes/com/ibc/**/*.class]
2018-10-26 10:31:44,841: org.springframework.core.io.support.PathMatchingResourcePatternResolver.doRetrieveMatchingFiles(PathMatchingResourcePatternResolver.java:615) [DEBUG] - Searching directory [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\http] for files matching pattern [G:/ibc-svn/private/HelloWorld/HelloWorldRoot/HelloWorldConfig/target/classes/com/ibc/**/*.class]
2018-10-26 10:31:44,845: org.springframework.core.io.support.PathMatchingResourcePatternResolver.doRetrieveMatchingFiles(PathMatchingResourcePatternResolver.java:615) [DEBUG] - Searching directory [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\redis] for files matching pattern [G:/ibc-svn/private/HelloWorld/HelloWorldRoot/HelloWorldConfig/target/classes/com/ibc/**/*.class]
2018-10-26 10:31:44,846: org.springframework.core.io.support.PathMatchingResourcePatternResolver.doRetrieveMatchingFiles(PathMatchingResourcePatternResolver.java:615) [DEBUG] - Searching directory [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\verify] for files matching pattern [G:/ibc-svn/private/HelloWorld/HelloWorldRoot/HelloWorldConfig/target/classes/com/ibc/**/*.class]
2018-10-26 10:31:44,850: org.springframework.core.io.support.PathMatchingResourcePatternResolver.findPathMatchingResources(PathMatchingResourcePatternResolver.java:354) [DEBUG] - Resolved location pattern [classpath*:com/ibc/**/*.class] to resources [file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\config\properties\PropertiesHotis.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\CookieUtils.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\DateUtil.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\DtoDealWith.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\encryption\AesRsaUtil.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\encryption\AESUtil.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\encryption\MD5Util.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\exceptions\CommonException.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\exceptions\ServiceException.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\format\JsonFormatUtil.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\format\MapFormatUtil.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\format\ObjectFormatUtil.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\format\StringFormatUtil.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\format\XmlFormatUtil.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\FtpUtil.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\http\HttpGetUtil.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\http\HttpPostUtil.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\http\HttpsClientWeChatUtils$1.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\http\HttpsClientWeChatUtils$2.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\http\HttpsClientWeChatUtils.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\http\HttpUtils$1.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\http\HttpUtils$2.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\http\HttpUtils.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\http\SSLUtil$1.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\http\SSLUtil$2.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\http\SSLUtil.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\IPUtil.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\MyPubUtil$1.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\MyPubUtil$2.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\MyPubUtil.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\PKUtil.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\RandomUtil.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\redis\RedisCallback.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\redis\RedisExpireUtil.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\redis\RedisUtil.class], file [G:\ibc-svn\private\HelloWorld\HelloWorldRoot\HelloWorldConfig\target\classes\com\ibc\config\utils\verify\RegularVerify.class]]
---------------異常org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/mvc]
Offending resource: URL [file:/G:/ibc-svn/private/HelloWorld/HelloWorldRoot/HelloWorldConfig/target/classes/spring-mvc-config.xml]

好吧還是最常見的問題,缺jar  

下面是該子工程全部的jar

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>HelloWorld</artifactId>
        <groupId>com.com.ibc</groupId>
        <version>1.0-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.com.ibc.config</groupId>
    <artifactId>HelloWorldConfig</artifactId>

    <dependencies>
        <!--Redis-->
        <dependency>
            <groupId>redis.clients</groupId>
            <artifactId>jedis</artifactId>
            <version>2.5.1</version>
        </dependency>
        <!--FTP-->
        <dependency>
            <groupId>commons-net</groupId>
            <artifactId>commons-net</artifactId>
            <version>3.3</version>
        </dependency>
        <!--Java HTML解析器-->
        <dependency>
            <groupId>org.jsoup</groupId>
            <artifactId>jsoup</artifactId>
            <version>1.7.2</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
        </dependency>

        <!-- java ee jar 包 -->
        <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
        </dependency>
        <!-- JSON -->
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-mapper-asl</artifactId>
        </dependency>

        <!--json-->
        <dependency>
            <groupId>net.sf.json-lib</groupId>
            <artifactId>json-lib</artifactId>
            <classifier>jdk15</classifier>
        </dependency>


        <!-- json 格式化對象,方便輸出日誌 -->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
        </dependency>

        <!--commons-->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-httpclient</groupId>
            <artifactId>commons-httpclient</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
        </dependency>


        <!-- spring核心包 -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-oxm</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-tx</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context-support</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jms</artifactId>
        </dependency>


        <!--dubbo-->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>dubbo</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!--zookeeper-->
        <dependency>
            <groupId>org.apache.zookeeper</groupId>
            <artifactId>zookeeper</artifactId>
        </dependency>
        <!--java啓動zkclient模擬-->
        <dependency>
            <groupId>com.101tec</groupId>
            <artifactId>zkclient</artifactId>
            <version>0.10</version>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
        </dependency>
    </dependencies>

</project>

嘗試啓動遠程服務

啓動web的單元測試,加載配置文件,調用遠程的接口和工具類

結果呢。。調用成功了,但是連續執行了兩次,肯定不符合我們的要求。繼續改

首先排除了 dubbo超時重複調用的問題,因爲單元測試類就重複執行了兩次。

我先檢查了web項目的spring的配置,發現沒問題,將調用切到另一個user服務,還是出現兩次問題,

排查單元測試方法的時候發現。。多了一個@Autowired註解。。沒刪乾淨很尷尬。。。

因爲Spring會先實例化所有Bean,然後根據配置進行掃描,當檢測到@Autowired後進行注入,注入時調用這個方法。所以被兩套機制分別調用了。

刪掉註解問題解決。通信基本完成。

回頭把工具服務放到遠程服務器上試試。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章