请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

ShopServiceTest测试是失败

四月 01, 2019 5:40:59 下午 org.springframework.test.context.support.DefaultTestContextBootstrapper getDefaultTestExecutionListenerClassNames
信息: Loaded default TestExecutionListener class names from location [META-INF/spring.factories]: [org.springframework.test.context.web.ServletTestExecutionListener, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener, org.springframework.test.context.support.DependencyInjectionTestExecutionListener, org.springframework.test.context.support.DirtiesContextTestExecutionListener, org.springframework.test.context.transaction.TransactionalTestExecutionListener, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener]
四月 01, 2019 5:40:59 下午 org.springframework.test.context.support.DefaultTestContextBootstrapper getTestExecutionListeners
信息: Using TestExecutionListeners: [org.springframework.test.context.web.ServletTestExecutionListener@6b143ee9, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@1936f0f5, org.springframework.test.context.support.DependencyInjectionTestExecutionListener@6615435c, org.springframework.test.context.support.DirtiesContextTestExecutionListener@4909b8da, org.springframework.test.context.transaction.TransactionalTestExecutionListener@3a03464, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener@2d3fcdbd]
四月 01, 2019 5:40:59 下午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from class path resource [spring/spring-dao.xml]
四月 01, 2019 5:40:59 下午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from class path resource [spring/spring-service.xml]
四月 01, 2019 5:40:59 下午 org.springframework.context.support.GenericApplicationContext prepareRefresh
信息: Refreshing org.springframework.context.support.GenericApplicationContext@7823a2f9: startup date [Mon Apr 01 17:40:59 CST 2019]; root of context hierarchy
四月 01, 2019 5:40:59 下午 com.mchange.v2.log.MLog <clinit>
信息: MLog clients using java 1.4+ standard logging.
四月 01, 2019 5:40:59 下午 com.mchange.v2.c3p0.C3P0Registry banner
信息: Initializing c3p0-0.9.1.2 [built 21-May-2007 15:04:56; debug? true; trace: 10]
17:40:59,992 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
17:40:59,992 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
17:40:59,992 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/G:/Users/liuxuan/eclipse-workspace/o2o/target/classes/logback.xml]
17:41:00,042 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
17:41:00,047 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Will scan for changes in [file:/G:/Users/liuxuan/eclipse-workspace/o2o/target/classes/logback.xml] 
17:41:00,047 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Setting ReconfigureOnChangeTask scanning period to 1 minutes
17:41:00,051 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
17:41:00,054 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [consoleAppender]
17:41:00,059 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
17:41:00,086 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
17:41:00,089 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [debugAppender]
17:41:00,097 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@1946988038 - Will use gz compression
17:41:00,099 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@1946988038 - Will use the pattern catalina.base_IS_UNDEFINED/logs/webapps/debug/debug.%d{yyyy-MM-dd}.log for the active file
17:41:00,102 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - The date pattern is 'yyyy-MM-dd' from file name pattern 'catalina.base_IS_UNDEFINED/logs/webapps/debug/debug.%d{yyyy-MM-dd}.log.gz'.
17:41:00,102 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Roll-over at midnight.
17:41:00,103 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Setting initial period to Mon Apr 01 17:16:49 CST 2019
17:41:00,104 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
17:41:00,106 |-ERROR in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Could not create component [filter] of type [ch.qos.logback.classis.filter.LevelFilter] java.lang.ClassNotFoundException: ch.qos.logback.classis.filter.LevelFilter
	at java.lang.ClassNotFoundException: ch.qos.logback.classis.filter.LevelFilter
	at 	at java.net.URLClassLoader.findClass(Unknown Source)
	at 	at java.lang.ClassLoader.loadClass(Unknown Source)
	at 	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at 	at java.lang.ClassLoader.loadClass(Unknown Source)
	at 	at ch.qos.logback.core.util.Loader.loadClass(Loader.java:120)
	at 	at ch.qos.logback.core.joran.action.NestedComplexPropertyIA.begin(NestedComplexPropertyIA.java:102)
	at 	at ch.qos.logback.core.joran.spi.Interpreter.callBeginAction(Interpreter.java:269)
	at 	at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:145)
	at 	at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:128)
	at 	at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:50)
	at 	at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:165)
	at 	at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:152)
	at 	at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110)
	at 	at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53)
	at 	at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)
	at 	at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150)
	at 	at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
	at 	at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
	at 	at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
	at 	at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
	at 	at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
	at 	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
	at 	at org.apache.ibatis.logging.slf4j.Slf4jImpl.<init>(Slf4jImpl.java:33)
	at 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at 	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at 	at org.apache.ibatis.logging.LogFactory.setImplementation(LogFactory.java:133)
	at 	at org.apache.ibatis.logging.LogFactory.useSlf4jLogging(LogFactory.java:93)
	at 	at org.apache.ibatis.logging.LogFactory$1.run(LogFactory.java:37)
	at 	at org.apache.ibatis.logging.LogFactory.tryImplementation(LogFactory.java:123)
	at 	at org.apache.ibatis.logging.LogFactory.<clinit>(LogFactory.java:34)
	at 	at org.mybatis.spring.SqlSessionFactoryBean.<clinit>(SqlSessionFactoryBean.java:78)
	at 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at 	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at 	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:142)
	at 	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89)
	at 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1147)
	at 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1099)
	at 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
	at 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
	at 	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
	at 	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	at 	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
	at 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
	at 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:742)
	at 	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
	at 	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
	at 	at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:128)
	at 	at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:60)
	at 	at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading(AbstractDelegatingSmartContextLoader.java:108)
	at 	at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext(AbstractDelegatingSmartContextLoader.java:251)
	at 	at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:98)
	at 	at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:116)
	at 	at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:83)
	at 	at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:117)
	at 	at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:83)
	at 	at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:230)
	at 	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:228)
	at 	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:287)
	at 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at 	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:289)
	at 	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:247)
	at 	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94)
	at 	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at 	at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
	at 	at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
	at 	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at 	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)
	at 	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:89)
	at 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
	at 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:541)
	at 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763)
	at 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463)
	at 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)
17:41:00,107 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@32:11 - no applicable action for [level], current ElementPath  is [[configuration][appender][filter][level]]
17:41:00,107 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@33:13 - no applicable action for [onMatch], current ElementPath  is [[configuration][appender][filter][onMatch]]
17:41:00,107 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@34:16 - no applicable action for [onMismatch], current ElementPath  is [[configuration][appender][filter][onMismatch]]
17:41:00,108 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[debugAppender] - Active log file name: catalina.base_IS_UNDEFINED/logs/webapps/debug.log
17:41:00,108 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[debugAppender] - File property is set to [catalina.base_IS_UNDEFINED/logs/webapps/debug.log]
17:41:00,109 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
17:41:00,109 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [infoAppender]
17:41:00,110 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@1682681674 - Will use gz compression
17:41:00,110 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@1682681674 - Will use the pattern catalina.base_IS_UNDEFINED/logs/webapps/info/info.%d{yyyy-MM-dd}.log for the active file
17:41:00,110 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - The date pattern is 'yyyy-MM-dd' from file name pattern 'catalina.base_IS_UNDEFINED/logs/webapps/info/info.%d{yyyy-MM-dd}.log.gz'.
17:41:00,110 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Roll-over at midnight.
17:41:00,111 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Setting initial period to Mon Apr 01 17:16:49 CST 2019
17:41:00,111 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
17:41:00,112 |-ERROR in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Could not create component [filter] of type [ch.qos.logback.classis.filter.LevelFilter] java.lang.ClassNotFoundException: ch.qos.logback.classis.filter.LevelFilter
	at java.lang.ClassNotFoundException: ch.qos.logback.classis.filter.LevelFilter
	at 	at java.net.URLClassLoader.findClass(Unknown Source)
	at 	at java.lang.ClassLoader.loadClass(Unknown Source)
	at 	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at 	at java.lang.ClassLoader.loadClass(Unknown Source)
	at 	at ch.qos.logback.core.util.Loader.loadClass(Loader.java:120)
	at 	at ch.qos.logback.core.joran.action.NestedComplexPropertyIA.begin(NestedComplexPropertyIA.java:102)
	at 	at ch.qos.logback.core.joran.spi.Interpreter.callBeginAction(Interpreter.java:269)
	at 	at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:145)
	at 	at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:128)
	at 	at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:50)
	at 	at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:165)
	at 	at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:152)
	at 	at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110)
	at 	at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53)
	at 	at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)
	at 	at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150)
	at 	at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
	at 	at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
	at 	at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
	at 	at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
	at 	at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
	at 	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
	at 	at org.apache.ibatis.logging.slf4j.Slf4jImpl.<init>(Slf4jImpl.java:33)
	at 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at 	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at 	at org.apache.ibatis.logging.LogFactory.setImplementation(LogFactory.java:133)
	at 	at org.apache.ibatis.logging.LogFactory.useSlf4jLogging(LogFactory.java:93)
	at 	at org.apache.ibatis.logging.LogFactory$1.run(LogFactory.java:37)
	at 	at org.apache.ibatis.logging.LogFactory.tryImplementation(LogFactory.java:123)
	at 	at org.apache.ibatis.logging.LogFactory.<clinit>(LogFactory.java:34)
	at 	at org.mybatis.spring.SqlSessionFactoryBean.<clinit>(SqlSessionFactoryBean.java:78)
	at 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at 	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at 	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:142)
	at 	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89)
	at 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1147)
	at 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1099)
	at 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
	at 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
	at 	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
	at 	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	at 	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
	at 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
	at 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:742)
	at 	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
	at 	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
	at 	at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:128)
	at 	at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:60)
	at 	at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading(AbstractDelegatingSmartContextLoader.java:108)
	at 	at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext(AbstractDelegatingSmartContextLoader.java:251)
	at 	at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:98)
	at 	at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:116)
	at 	at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:83)
	at 	at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:117)
	at 	at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:83)
	at 	at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:230)
	at 	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:228)
	at 	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:287)
	at 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at 	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:289)
	at 	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:247)
	at 	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94)
	at 	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at 	at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
	at 	at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
	at 	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at 	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)
	at 	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:89)
	at 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
	at 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:541)
	at 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763)
	at 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463)
	at 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)
17:41:00,112 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@52:11 - no applicable action for [level], current ElementPath  is [[configuration][appender][filter][level]]
17:41:00,112 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@53:13 - no applicable action for [onMatch], current ElementPath  is [[configuration][appender][filter][onMatch]]
17:41:00,112 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@54:16 - no applicable action for [onMismatch], current ElementPath  is [[configuration][appender][filter][onMismatch]]
17:41:00,112 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[infoAppender] - Active log file name: catalina.base_IS_UNDEFINED/logs/webapps/info.log
17:41:00,112 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[infoAppender] - File property is set to [catalina.base_IS_UNDEFINED/logs/webapps/info.log]
17:41:00,112 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
17:41:00,112 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [errorAppender]
17:41:00,112 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@1965445467 - Will use gz compression
17:41:00,113 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@1965445467 - Will use the pattern catalina.base_IS_UNDEFINED/logs/webapps/error/error.%d{yyyy-MM-dd}.log for the active file
17:41:00,113 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - The date pattern is 'yyyy-MM-dd' from file name pattern 'catalina.base_IS_UNDEFINED/logs/webapps/error/error.%d{yyyy-MM-dd}.log.gz'.
17:41:00,113 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Roll-over at midnight.
17:41:00,113 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Setting initial period to Mon Apr 01 17:16:49 CST 2019
17:41:00,114 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
17:41:00,114 |-ERROR in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Could not create component [filter] of type [ch.qos.logback.classis.filter.LevelFilter] java.lang.ClassNotFoundException: ch.qos.logback.classis.filter.LevelFilter
	at java.lang.ClassNotFoundException: ch.qos.logback.classis.filter.LevelFilter
	at 	at java.net.URLClassLoader.findClass(Unknown Source)
	at 	at java.lang.ClassLoader.loadClass(Unknown Source)
	at 	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at 	at java.lang.ClassLoader.loadClass(Unknown Source)
	at 	at ch.qos.logback.core.util.Loader.loadClass(Loader.java:120)
	at 	at ch.qos.logback.core.joran.action.NestedComplexPropertyIA.begin(NestedComplexPropertyIA.java:102)
	at 	at ch.qos.logback.core.joran.spi.Interpreter.callBeginAction(Interpreter.java:269)
	at 	at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:145)
	at 	at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:128)
	at 	at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:50)
	at 	at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:165)
	at 	at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:152)
	at 	at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110)
	at 	at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53)
	at 	at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)
	at 	at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150)
	at 	at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
	at 	at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
	at 	at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
	at 	at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
	at 	at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
	at 	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
	at 	at org.apache.ibatis.logging.slf4j.Slf4jImpl.<init>(Slf4jImpl.java:33)
	at 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at 	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at 	at org.apache.ibatis.logging.LogFactory.setImplementation(LogFactory.java:133)
	at 	at org.apache.ibatis.logging.LogFactory.useSlf4jLogging(LogFactory.java:93)
	at 	at org.apache.ibatis.logging.LogFactory$1.run(LogFactory.java:37)
	at 	at org.apache.ibatis.logging.LogFactory.tryImplementation(LogFactory.java:123)
	at 	at org.apache.ibatis.logging.LogFactory.<clinit>(LogFactory.java:34)
	at 	at org.mybatis.spring.SqlSessionFactoryBean.<clinit>(SqlSessionFactoryBean.java:78)
	at 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at 	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at 	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:142)
	at 	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89)
	at 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1147)
	at 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1099)
	at 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
	at 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
	at 	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
	at 	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	at 	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
	at 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
	at 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:742)
	at 	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
	at 	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
	at 	at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:128)
	at 	at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:60)
	at 	at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading(AbstractDelegatingSmartContextLoader.java:108)
	at 	at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext(AbstractDelegatingSmartContextLoader.java:251)
	at 	at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:98)
	at 	at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:116)
	at 	at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:83)
	at 	at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:117)
	at 	at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:83)
	at 	at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:230)
	at 	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:228)
	at 	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:287)
	at 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at 	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:289)
	at 	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:247)
	at 	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94)
	at 	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at 	at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
	at 	at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
	at 	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at 	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)
	at 	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:89)
	at 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
	at 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:541)
	at 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763)
	at 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463)
	at 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)
17:41:00,114 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@72:11 - no applicable action for [level], current ElementPath  is [[configuration][appender][filter][level]]
17:41:00,114 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@73:13 - no applicable action for [onMatch], current ElementPath  is [[configuration][appender][filter][onMatch]]
17:41:00,114 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@74:16 - no applicable action for [onMismatch], current ElementPath  is [[configuration][appender][filter][onMismatch]]
17:41:00,115 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[errorAppender] - Active log file name: catalina.base_IS_UNDEFINED/logs/webapps/error.log
17:41:00,115 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[errorAppender] - File property is set to [catalina.base_IS_UNDEFINED/logs/webapps/error.log]
17:41:00,115 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.imooc.o2o] to DEBUG
17:41:00,115 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting additivity of logger [com.imooc.o2o] to true
17:41:00,115 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [debugAppender] to Logger[com.imooc.o2o]
17:41:00,116 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [infoAppender] to Logger[com.imooc.o2o]
17:41:00,116 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [errorAppender] to Logger[com.imooc.o2o]
17:41:00,116 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
17:41:00,116 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [consoleAppender] to Logger[ROOT]
17:41:00,116 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
17:41:00,116 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@1ed4ae0f - Registering current configuration as safe fallback point

四月 01, 2019 5:41:00 下午 com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource getPoolManager
信息: Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 2, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 10000, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1hge15za11o0am5q1czt66w|223d2c72, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.mysql.jdbc.Driver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1hge15za11o0am5q1czt66w|223d2c72, idleConnectionTestPeriod -> 0, initialPoolSize -> 3, jdbcUrl -> jdbc:mysql://localhost:3306/o2o?useUnicode=true&characterEncoding=utf8, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 30, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 10, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> null, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]
2019-04-01 17:41:00.778  [main]  DEBUG  com.imooc.o2o.dao.ShopDao.insertShop - ==>  Preparing: INSERT INTO tb_shop(owner_id, area_id, shop_category_id, shop_name, shop_desc, shop_addr, phone, shop_img, priority, create_time, last_edit_time, enable_status, advice) VALUES (?,?,?,?, ?,?,?,?,?, ?,?, ?,?) 
2019-04-01 17:41:00.809  [main]  DEBUG  com.imooc.o2o.dao.ShopDao.insertShop - ==> Parameters: 1(Long), 2(Integer), 1(Long), 测试的店铺1(String), test1(String), test1(String), test1(String), null, null, 2019-04-01 17:41:00.749(Timestamp), 2019-04-01 17:41:00.749(Timestamp), 0(Integer), 审核中(String)
2019-04-01 17:41:00.811  [main]  DEBUG  com.imooc.o2o.dao.ShopDao.insertShop - <==    Updates: 1
四月 01, 2019 5:41:00 下午 org.springframework.context.support.GenericApplicationContext doClose
信息: Closing org.springframework.context.support.GenericApplicationContext@7823a2f9: startup date [Mon Apr 01 17:40:59 CST 2019]; root of context hierarchy

这上面是控制台的信息。

图片描述
图片里是junit的错误日志。
我看跟老师的区别在于只进行了insert 后面的update就没有进行了。我没有直接copy老师您的代码 都是自己打的。请问老师是哪里出问题了?

四月 02, 2019 1:52:57 下午 org.springframework.test.context.support.DefaultTestContextBootstrapper getDefaultTestExecutionListenerClassNames
信息: Loaded default TestExecutionListener class names from location [META-INF/spring.factories]: [org.springframework.test.context.web.ServletTestExecutionListener, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener, org.springframework.test.context.support.DependencyInjectionTestExecutionListener, org.springframework.test.context.support.DirtiesContextTestExecutionListener, org.springframework.test.context.transaction.TransactionalTestExecutionListener, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener]
四月 02, 2019 1:52:57 下午 org.springframework.test.context.support.DefaultTestContextBootstrapper getTestExecutionListeners
信息: Using TestExecutionListeners: [org.springframework.test.context.web.ServletTestExecutionListener@6b143ee9, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@1936f0f5, org.springframework.test.context.support.DependencyInjectionTestExecutionListener@6615435c, org.springframework.test.context.support.DirtiesContextTestExecutionListener@4909b8da, org.springframework.test.context.transaction.TransactionalTestExecutionListener@3a03464, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener@2d3fcdbd]
四月 02, 2019 1:52:57 下午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from class path resource [spring/spring-dao.xml]
四月 02, 2019 1:52:57 下午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from class path resource [spring/spring-service.xml]
四月 02, 2019 1:52:57 下午 org.springframework.context.support.GenericApplicationContext prepareRefresh
信息: Refreshing org.springframework.context.support.GenericApplicationContext@7823a2f9: startup date [Tue Apr 02 13:52:57 CST 2019]; root of context hierarchy
四月 02, 2019 1:52:58 下午 com.mchange.v2.log.MLog <clinit>
信息: MLog clients using java 1.4+ standard logging.
四月 02, 2019 1:52:58 下午 com.mchange.v2.c3p0.C3P0Registry banner
信息: Initializing c3p0-0.9.1.2 [built 21-May-2007 15:04:56; debug? true; trace: 10]
四月 02, 2019 1:52:58 下午 com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource getPoolManager
信息: Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 2, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 10000, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1hge15za11p7l80a1s96498|223d2c72, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.mysql.jdbc.Driver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1hge15za11p7l80a1s96498|223d2c72, idleConnectionTestPeriod -> 0, initialPoolSize -> 3, jdbcUrl -> jdbc:mysql://localhost:3306/o2o?useUnicode=true&characterEncoding=utf8, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 30, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 10, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> null, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]
2019-04-02 13:52:59.131 [main] DEBUG com.imooc.o2o.dao.ShopDao.insertShop - ==>  Preparing: INSERT INTO tb_shop(owner_id, area_id, shop_category_id, shop_name, shop_desc, shop_addr, phone, shop_img, priority, create_time, last_edit_time, enable_status, advice) VALUES (?,?,?,?, ?,?,?,?,?, ?,?, ?,?) 
2019-04-02 13:52:59.161 [main] DEBUG com.imooc.o2o.dao.ShopDao.insertShop - ==> Parameters: 1(Long), 2(Integer), 1(Long), 测试的店铺1(String), test1(String), test1(String), test1(String), null, null, 2019-04-02 13:52:59.094(Timestamp), 2019-04-02 13:52:59.094(Timestamp), 0(Integer), 审核中(String)
2019-04-02 13:52:59.163 [main] DEBUG com.imooc.o2o.dao.ShopDao.insertShop - <==    Updates: 1
四月 02, 2019 1:52:59 下午 org.springframework.context.support.GenericApplicationContext doClose
信息: Closing org.springframework.context.support.GenericApplicationContext@7823a2f9: startup date [Tue Apr 02 13:52:57 CST 2019]; root of context hierarchy

老师这是新的错误日志,变短了好多

正在回答

2回答

同学好,看错误是logback配置错了,需要看看pom.xml里面对应的logback jar有没有引入,以及

logback配置,可以直接粘贴我的,成功后,再看看错在哪里

<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="60 seconds" debug="false">
	<!-- 定义参数常量 -->
	<!-- TRACE<DEBUG<INFO<WARN<ERROR -->
	<!-- logger.trace("msg") logger.debug... -->
	<property name="log.level" value="debug" />
	<property name="log.maxHistory" value="30" />
	<property name="log.filePath" value="${catalina.base}/logs/webapps" />
	<property name="log.pattern"
		value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n" />
	<!-- 控制台设置 -->
	<appender name="consoleAppender" class="ch.qos.logback.core.ConsoleAppender">
		<encoder>
			<pattern>${log.pattern}</pattern>
		</encoder>
	</appender>
	<!-- DEBUG -->
	<appender name="debugAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
		<!-- 文件路径 -->
		<file>${log.filePath}/debug.log</file>
		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
			<!-- 文件名称 -->
			<fileNamePattern>${log.filePath}/debug/debug.%d{yyyy-MM-dd}.log.gz
			</fileNamePattern>
			<!-- 文件最大保存历史数量 -->
			<maxHistory>${log.maxHistory}</maxHistory>
		</rollingPolicy>
		<encoder>
			<pattern>${log.pattern}</pattern>
		</encoder>
		<filter class="ch.qos.logback.classic.filter.LevelFilter">
			<level>DEBUG</level>
			<onMatch>ACCEPT</onMatch>
			<onMismatch>DENY</onMismatch>
		</filter>
	</appender>
	<!-- INFO -->
	<appender name="infoAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
		<!-- 文件路径 -->
		<file>${log.filePath}/info.log</file>
		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
			<!-- 文件名称 -->
			<fileNamePattern>${log.filePath}/info/info.%d{yyyy-MM-dd}.log.gz
			</fileNamePattern>
			<!-- 文件最大保存历史数量 -->
			<maxHistory>${log.maxHistory}</maxHistory>
		</rollingPolicy>
		<encoder>
			<pattern>${log.pattern}</pattern>
		</encoder>
		<filter class="ch.qos.logback.classic.filter.LevelFilter">
			<level>INFO</level>
			<onMatch>ACCEPT</onMatch>
			<onMismatch>DENY</onMismatch>
		</filter>
	</appender>
	<!-- ERROR -->
	<appender name="errorAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
		<!-- 文件路径 -->
		<file>${log.filePath}/erorr.log</file>
		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
			<!-- 文件名称 -->
			<fileNamePattern>${log.filePath}/error/error.%d{yyyy-MM-dd}.log.gz
			</fileNamePattern>
			<!-- 文件最大保存历史数量 -->
			<maxHistory>${log.maxHistory}</maxHistory>
		</rollingPolicy>
		<encoder>
			<pattern>${log.pattern}</pattern>
		</encoder>
		<filter class="ch.qos.logback.classic.filter.LevelFilter">
			<level>ERROR</level>
			<onMatch>ACCEPT</onMatch>
			<onMismatch>DENY</onMismatch>
		</filter>
	</appender>
	<logger name="com.imooc.o2o" level="${log.level}" additivity="true">
		<appender-ref ref="debugAppender"/>
		<appender-ref ref="infoAppender"/>
		<appender-ref ref="errorAppender"/>
	</logger>
	<root level="info">
		<appender-ref ref="consoleAppender"/>
	</root>
</configuration>


0 回复 有任何疑惑可以回复我~
  • 提问者 qq_慕沐2345934 #1
    老师测试日志变的很短了,在上面的代码栏里.logback是用得老师你的。我发现和视频中的区别在于,日志只汇报了插入的内容,而没有更新的内容。但是我对比了代码.Impl中的shop.insert和shop.update都没有错。
    还有就是控制台日志中并没返回logger.debug("current relativeAddr is :" + relativeAddr);和logger.debug("current complete adds is :" + PathUtil.getImgBasePath() + relativeAddr);的内容。
    回复 有任何疑惑可以回复我~ 2019-04-02 14:01:12
  • 提问者 qq_慕沐2345934 #2
    非常感谢!
    回复 有任何疑惑可以回复我~ 2019-04-02 15:50:31
翔仔 2019-04-03 17:39:45

同学好,logback配置只管的是显示,比如说显示Debug级别还有其他级别的日志,但是具体是否输出还需要看程序里面有没有记录日志,以及如何记录日志的

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信