1. 程式人生 > >(三) 架構搭建-專案基礎框架啟動

(三) 架構搭建-專案基礎框架啟動

先總結下問題:

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
[email protected]
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後進行注入,注入時呼叫這個方法。所以被兩套機制分別呼叫了。

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

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

相關推薦

架構搭建-專案基礎框架啟動

先總結下問題: 1、模擬啟動子服務異常-子服務是工具服務 模擬器的測試類 先啟動zkServer.cmd 需要的包 "C:\Program Files\Java\jdk1.7.0_80\bin\java" "-javaagent:E:\KF\Intell

MVVM架構模式 入門MVVM模式的常用框架:MVVM Light輕量級、Prism重量級等等

轉http://www.cnblogs.com/tianciliangen/p/7890742.html 實現MVVM的框架有很多,如: • MVVM Light Toolkit: http://mvvmlight.codeplex.com • Microsoft Prism&

【SSH 】struts2專案搭建

1,下載struts2 jar包。 http://struts.apache.org/。 2,Eclipse新建web dynamic project,專案預設是沒有web.xml的,通常這時會去網上找,但是又會擔心是否靠譜,每一次建專案都得複製貼上。其實可以讓Eclips

架構搭建-MAVEN專案搭建

字寫小一點:先不落落原理,原理另開一個系列落落。這個系列就搭框架,目的超級簡單,把能融合的中介軟體都揉道一起去,然後優化。 外掛等版本號 jdk 1.7.0.80 maven 3.3.9 tomcat 7.0.82 zookeeper 3.4.9 IDEA建立 基礎

Golang入門教程beego 快速開發 HTTP 框架

應用 inf ado .com home clas lan mime iyu   beego 是一個快速開發 Go 應用的 HTTP 框架,他可以用來快速開發 API、Web 及後端服務等各種應用,是一個 RESTful 的框架,主要設計靈感來源於 tornado、sina

集群搭建Hadoop搭建HDFS完全分布式

意思 cati 臨時 等於 style www 比較 環境變量 AD Hadoop集群搭建(完全分布式) 前期準備(4臺linux服務器),具體搭建過程可以參考https://www.cnblogs.com/monco/p/9046614.html(克隆虛擬機比較方便)

kafka:核心概念以及框架

一、核心概念 1.Message: 資料.傳遞的資料物件,主要由四部分構成:offset(偏移量)、key、value、timestamp(插入時間)。 2.Broker: 一般情況一臺伺服器一個broker,但是可以部署多個,反應到具體的程序就是Kafka程序 3.Topic:

Maven學習筆記--構建maven專案

構建maven專案 mvn archetype:generate -DgroupId=com.janson.app -DartifactId=jansonTest -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMo

CentOS7搭建FastDFS V5.11分散式檔案系統

第一篇主要講下載相關的軟體安裝包; 第二篇主要講FastDFS的搭建; 第三篇主要講FastDFS與Nginx的整合; 1、FastDFS與Nginx的整合並測試 前面兩篇博文已對FastDFS的安裝和配置,做了比較詳細的講解。FastDFS的基礎模組都搭好了,現在開始測試下載。

SpringBoot 手動搭建springboot簡單框架

1、新建maven工程 2、在pom.xml檔案中配置springboot需要的依賴 <parent> <groupId>org.springframework.boot</groupId> <artifactId>sprin

【深度學習】線性迴歸使用MXNet深度學習框架實現線性迴歸

文章目錄 概述 程式碼 概述 這篇文章使用MXNet深度學習框架中的Gluon包實現小批量隨機梯度下降的線性迴歸問題。可以參考我的上一篇文章【深度學習】線性迴歸(二)小批量隨機梯度下降及其python實現。 主要包

Maven實戰——多模組專案的POM重構

在本專欄的上一篇文章POM重構之增還是刪中,我們討論了一些簡單實用的POM重構技巧,包括重構的前提——持續整合,以及如何通過新增或者刪除內容來提高POM的可讀性和構建的穩定性。但在實際的專案中,這些技巧還是不夠的,特別值得一提的是,實際的Maven專案基本都是多模組的,如果僅

阿里雲伺服器的web專案釋出之路:將web專案釋出到雲伺服器

1.配置阿里雲的安全組,主要是允許8080,80埠的訪問,這樣做的目的主要是為了能讓外網進行訪問,當然,這個地方也能設定專門網段訪問你的公網,配置如下所示 這個地方你也可以通過克隆的方式新增。 8080:被用於WWW代理服務的,可以實現網頁瀏覽,經常在訪問某個網站或使用代理伺服器的

JavaWeb-關於web專案中的路徑問題及URL編碼問題

一、web專案中的路徑問題 1-1獲得資源路徑 1-1-1class類獲得資源 InputStream in= this.getClass().getResourceAsStream("..."); class類中的ResourceAsStream;    

JAVA 筆記 從原始碼深入淺出集合框架

集合框架概述 以Java來說,我們日常所做的編寫程式碼的工作,其實基本上往往就是在和物件打交道。 但顯然有一個情況是,一個應用程式裡往往不會僅僅只包含數量固定且生命週期都是已知的物件。 所以,就需要通過一些方式來對物件進行持有,那麼通常是通過怎麼樣的方式來

FPGA實踐教程系統搭建與燒錄

本文件系列是我在實踐將神經網路實現到Xilinx 的zynq的FPGA上遇到的問題和解決方法。 背景:我們用vivado HLS對相關軟體生成了相應的IP core,現在我們需要將IPcore整合為系統模式,整合為系統才能燒錄到FPGA上。 目的:用vivado軟體搭建相

給你一臺大疆無人機,你能用來做點啥?------傾斜攝影建模基礎

        在做正射影像或者傾斜建模過程中會涉及到一些攝影測量和傾斜建模有關一些知識,順便查了一些資料,然後覺得很有必要,就稍微系統羅列了一下,在最後還提供了幾個建模航線為大家作為參考,希望對大家有幫助。 一、重疊度、航線彎曲、像片旋角。 1.1航向重疊率  

成就係統實現-架構設計

1.技術選型 之前上網找過一些關於成就係統設計的文件,推薦的都是事件驅動模型,因此底層設計也基於這個模型來做,由業務方產生可能觸發成就的事件,統一放到一個佇列裡面,由執行緒去取佇列裡面的事件,進行分發處理。 技術點: 1.1 事件驅動模型 1.2 disruptor 號稱百

論文總結-- 超分辨演算法基礎與綜述

影象解析度的概念 影象解析度泛指成像或顯示系統對細節的分辨能力,代表影象中儲存的資訊量。 指影象中儲存的資訊量,是每英寸影象內有多少個畫素點,解析度的單位為PPI(Pixels Per Inch),通常叫做:畫素每英寸。 圖片的大小由畫素的多少決定,解析度

android開發教程——環境搭建之android-sdk

目錄 android sdk包括開發android app所需要的編譯、除錯、測試開發工具和API庫。 下載android sdk: 在這個下載頁中提供兩種下載方式: 集成了adt的ide和android sdk的包,即包含了android sdk、adt、eclips