|
楼主 |
发表于 2018-5-28 16:32:11
|
显示全部楼层
没有报错,控制台输出信息:[com.trilink.model.User:24].................................................begin.......................[org.springframework.test.context.support.DirtiesContextTestExecutionListener:94]After test method: context [DefaultTestContext@5ed74c35 testClass = UserJunit, testInstance = test.UserJunit@8cc5c38, testMethod = getCount@UserJunit, testException = java.lang.NullPointerException, mergedContextConfiguration = [MergedContextConfiguration@20ba650b testClass = UserJunit, locations = '{classpath:spring-hibernate.xml}', classes = '{}', contextInitializerClasses = '[]', activeProfiles = '{}', contextLoader = 'org.springframework.test.context.support.DelegatingSmartContextLoader', parent = [null]]], class dirties context [false], class mode [null], method dirties context [false].
[org.springframework.test.context.support.DirtiesContextTestExecutionListener:126]After test class: context [DefaultTestContext@5ed74c35 testClass = UserJunit, testInstance = [null], testMethod = [null], testException = [null], mergedContextConfiguration = [MergedContextConfiguration@20ba650b testClass = UserJunit, locations = '{classpath:spring-hibernate.xml}', classes = '{}', contextInitializerClasses = '[]', activeProfiles = '{}', contextLoader = 'org.springframework.test.context.support.DelegatingSmartContextLoader', parent = [null]]], dirtiesContext [false].
[org.springframework.context.support.GenericApplicationContext:875]Closing org.springframework.context.support.GenericApplicationContext@7c935c95: startup date [Wed May 23 15:56:05 CST 2018]; root of context hierarchy
[org.springframework.beans.factory.support.DefaultListableBeanFactory:247]Returning cached instance of singleton bean 'lifecycleProcessor'
[org.springframework.beans.factory.support.DefaultListableBeanFactory:486]Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@335ee1b3: defining beans [org.springframework.aop.config.internalAutoProxyCreator,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0,dataSource_enter,dataSource,sessionFactory,jdbcTemplate,namedParameterJdbcTemplate,miniDaoHandler,transactionManager,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,txAdvice,transactionPointcut,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor,org.springframework.context.annotation.ConfigurationClassPostProcessor.enhancedConfigurationProcessor]; root of factory hierarchy
[org.springframework.beans.factory.support.DefaultListableBeanFactory:542]Retrieved dependent beans for bean '(inner bean)#2d450bdf': [txAdvice]
[org.springframework.beans.factory.support.DisposableBeanAdapter:245]Invoking destroy() on bean with name 'sessionFactory'
[org.hibernate.internal.SessionFactoryImpl:1386]HHH000031: Closing
[org.springframework.beans.factory.support.DisposableBeanAdapter:323]Invoking destroy method 'close' on bean with name 'dataSource_enter'
[com.alibaba.druid.pool.DruidDataSource:982]{dataSource-1} closed
|
|