Closing JPA EntityManagerFactory for persistence unit 'default'
来源:5-1 买家商品-dao
慕仙1183570
2020-02-16
2020-02-17 00:34:34,192 - Closing org.springframework.web.context.support.GenericWebApplicationContext@3f4faf53: startup date [Mon Feb 17 00:34:26 CST 2020]; root of context hierarchy
2020-02-17 00:34:34,196 - Closing JPA EntityManagerFactory for persistence unit 'default’
为什么我findBy查询数据都查不出来,数据库是有的
查了google也不知道怎么解决,运行了下老师的代码也是如此
程序没有报错,可是只要执行语句最后两行就有
2020-02-17 02:37:33,003 - Closing org.springframework.web.context.support.GenericWebApplicationContext@3f4faf53: startup date [Mon Feb 17 02:37:25 CST 2020]; root of context hierarchy
2020-02-17 02:37:33,007 - Closing JPA EntityManagerFactory for persistence unit ‘default’
完整的是:
“C:\Program Files\Java\jdk1.8.0_131\bin\java.exe” -ea -Didea.test.cyclic.buffer.size=1048576 “-javaagent:C:\Tool\idea\window\IntelliJ IDEA 2019.2.4\lib\idea_rt.jar=5004:C:\Tool\idea\window\IntelliJ IDEA 2019.2.4\bin” -Dfile.encoding=UTF-8 -classpath “C:\Tool\idea\window\IntelliJ IDEA 2019.2.4\lib\idea_rt.jar;C:\Tool\idea\window\IntelliJ IDEA 2019.2.4\plugins\junit\lib\junit-rt.jar;C:\Tool\idea\window\IntelliJ IDEA 2019.2.4\plugins\junit\lib\junit5-rt.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\rt.jar;D:\MyWorld\sell_2_16\target\test-classes;D:\MyWorld\sell_2_16\target\classes;C:\Users\OneOnePeng.m2\repository\org\springframework\boot\spring-boot-starter-web\1.5.3.RELEASE\spring-boot-starter-web-1.5.3.RELEASE.jar;C:\Users\OneOnePeng.m2\repository\org\springframework\boot\spring-boot-starter\1.5.3.RELEASE\spring-boot-starter-1.5.3.RELEASE.jar;C:\Users\OneOnePeng.m2\repository\org\springframework\boot\spring-boot\1.5.3.RELEASE\spring-boot-1.5.3.RELEASE.jar;C:\Users\OneOnePeng.m2\repository\org\springframework\boot\spring-boot-autoconfigure\1.5.3.RELEASE\spring-boot-autoconfigure-1.5.3.RELEASE.jar;C:\Users\OneOnePeng.m2\repository\org\springframework\boot\spring-boot-starter-logging\1.5.3.RELEASE\spring-boot-starter-logging-1.5.3.RELEASE.jar;C:\Users\OneOnePeng.m2\repository\ch\qos\logback\logback-classic\1.1.11\logback-classic-1.1.11.jar;C:\Users\OneOnePeng.m2\repository\ch\qos\logback\logback-core\1.1.11\logback-core-1.1.11.jar;C:\Users\OneOnePeng.m2\repository\org\slf4j\jul-to-slf4j\1.7.25\jul-to-slf4j-1.7.25.jar;C:\Users\OneOnePeng.m2\repository\org\slf4j\log4j-over-slf4j\1.7.25\log4j-over-slf4j-1.7.25.jar;C:\Users\OneOnePeng.m2\repository\org\yaml\snakeyaml\1.17\snakeyaml-1.17.jar;C:\Users\OneOnePeng.m2\repository\org\springframework\boot\spring-boot-starter-tomcat\1.5.3.RELEASE\spring-boot-starter-tomcat-1.5.3.RELEASE.jar;C:\Users\OneOnePeng.m2\repository\org\apache\tomcat\embed\tomcat-embed-core\8.5.14\tomcat-embed-core-8.5.14.jar;C:\Users\OneOnePeng.m2\repository\org\apache\tomcat\embed\tomcat-embed-el\8.5.14\tomcat-embed-el-8.5.14.jar;C:\Users\OneOnePeng.m2\repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.14\tomcat-embed-websocket-8.5.14.jar;C:\Users\OneOnePeng.m2\repository\org\hibernate\hibernate-validator\5.3.5.Final\hibernate-validator-5.3.5.Final.jar;C:\Users\OneOnePeng.m2\repository\javax\validation\validation-api\1.1.0.Final\validation-api-1.1.0.Final.jar;C:\Users\OneOnePeng.m2\repository\org\jboss\logging\jboss-logging\3.3.1.Final\jboss-logging-3.3.1.Final.jar;C:\Users\OneOnePeng.m2\repository\com\fasterxml\classmate\1.3.3\classmate-1.3.3.jar;C:\Users\OneOnePeng.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.8.8\jackson-databind-2.8.8.jar;C:\Users\OneOnePeng.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.8.0\jackson-annotations-2.8.0.jar;C:\Users\OneOnePeng.m2\repository\com\fasterxml\jackson\core\jackson-core\2.8.8\jackson-core-2.8.8.jar;C:\Users\OneOnePeng.m2\repository\org\springframework\spring-web\4.3.8.RELEASE\spring-web-4.3.8.RELEASE.jar;C:\Users\OneOnePeng.m2\repository\org\springframework\spring-aop\4.3.8.RELEASE\spring-aop-4.3.8.RELEASE.jar;C:\Users\OneOnePeng.m2\repository\org\springframework\spring-beans\4.3.8.RELEASE\spring-beans-4.3.8.RELEASE.jar;C:\Users\OneOnePeng.m2\repository\org\springframework\spring-context\4.3.8.RELEASE\spring-context-4.3.8.RELEASE.jar;C:\Users\OneOnePeng.m2\repository\org\springframework\spring-webmvc\4.3.8.RELEASE\spring-webmvc-4.3.8.RELEASE.jar;C:\Users\OneOnePeng.m2\repository\org\springframework\spring-expression\4.3.8.RELEASE\spring-expression-4.3.8.RELEASE.jar;C:\Users\OneOnePeng.m2\repository\org\springframework\boot\spring-boot-starter-test\1.5.3.RELEASE\spring-boot-starter-test-1.5.3.RELEASE.jar;C:\Users\OneOnePeng.m2\repository\org\springframework\boot\spring-boot-test\1.5.3.RELEASE\spring-boot-test-1.5.3.RELEASE.jar;C:\Users\OneOnePeng.m2\repository\org\springframework\boot\spring-boot-test-autoconfigure\1.5.3.RELEASE\spring-boot-test-autoconfigure-1.5.3.RELEASE.jar;C:\Users\OneOnePeng.m2\repository\com\jayway\jsonpath\json-path\2.2.0\json-path-2.2.0.jar;C:\Users\OneOnePeng.m2\repository\net\minidev\json-smart\2.2.1\json-smart-2.2.1.jar;C:\Users\OneOnePeng.m2\repository\net\minidev\accessors-smart\1.1\accessors-smart-1.1.jar;C:\Users\OneOnePeng.m2\repository\org\ow2\asm\asm\5.0.3\asm-5.0.3.jar;C:\Users\OneOnePeng.m2\repository\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;C:\Users\OneOnePeng.m2\repository\org\assertj\assertj-core\2.6.0\assertj-core-2.6.0.jar;C:\Users\OneOnePeng.m2\repository\org\mockito\mockito-core\1.10.19\mockito-core-1.10.19.jar;C:\Users\OneOnePeng.m2\repository\org\objenesis\objenesis\2.1\objenesis-2.1.jar;C:\Users\OneOnePeng.m2\repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;C:\Users\OneOnePeng.m2\repository\org\hamcrest\hamcrest-library\1.3\hamcrest-library-1.3.jar;C:\Users\OneOnePeng.m2\repository\org\skyscreamer\jsonassert\1.4.0\jsonassert-1.4.0.jar;C:\Users\OneOnePeng.m2\repository\com\vaadin\external\google\android-json\0.0.20131108.vaadin1\android-json-0.0.20131108.vaadin1.jar;C:\Users\OneOnePeng.m2\repository\org\springframework\spring-core\4.3.8.RELEASE\spring-core-4.3.8.RELEASE.jar;C:\Users\OneOnePeng.m2\repository\org\springframework\spring-test\4.3.8.RELEASE\spring-test-4.3.8.RELEASE.jar;C:\Users\OneOnePeng.m2\repository\mysql\mysql-connector-java\5.1.41\mysql-connector-java-5.1.41.jar;C:\Users\OneOnePeng.m2\repository\org\springframework\boot\spring-boot-starter-data-jpa\1.5.3.RELEASE\spring-boot-starter-data-jpa-1.5.3.RELEASE.jar;C:\Users\OneOnePeng.m2\repository\org\springframework\boot\spring-boot-starter-aop\1.5.3.RELEASE\spring-boot-starter-aop-1.5.3.RELEASE.jar;C:\Users\OneOnePeng.m2\repository\org\aspectj\aspectjweaver\1.8.10\aspectjweaver-1.8.10.jar;C:\Users\OneOnePeng.m2\repository\org\springframework\boot\spring-boot-starter-jdbc\1.5.3.RELEASE\spring-boot-starter-jdbc-1.5.3.RELEASE.jar;C:\Users\OneOnePeng.m2\repository\org\apache\tomcat\tomcat-jdbc\8.5.14\tomcat-jdbc-8.5.14.jar;C:\Users\OneOnePeng.m2\repository\org\apache\tomcat\tomcat-juli\8.5.14\tomcat-juli-8.5.14.jar;C:\Users\OneOnePeng.m2\repository\org\springframework\spring-jdbc\4.3.8.RELEASE\spring-jdbc-4.3.8.RELEASE.jar;C:\Users\OneOnePeng.m2\repository\org\hibernate\hibernate-core\5.0.12.Final\hibernate-core-5.0.12.Final.jar;C:\Users\OneOnePeng.m2\repository\org\hibernate\javax\persistence\hibernate-jpa-2.1-api\1.0.0.Final\hibernate-jpa-2.1-api-1.0.0.Final.jar;C:\Users\OneOnePeng.m2\repository\org\javassist\javassist\3.21.0-GA\javassist-3.21.0-GA.jar;C:\Users\OneOnePeng.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;C:\Users\OneOnePeng.m2\repository\org\jboss\jandex\2.0.0.Final\jandex-2.0.0.Final.jar;C:\Users\OneOnePeng.m2\repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar;C:\Users\OneOnePeng.m2\repository\org\hibernate\common\hibernate-commons-annotations\5.0.1.Final\hibernate-commons-annotations-5.0.1.Final.jar;C:\Users\OneOnePeng.m2\repository\org\hibernate\hibernate-entitymanager\5.0.12.Final\hibernate-entitymanager-5.0.12.Final.jar;C:\Users\OneOnePeng.m2\repository\javax\transaction\javax.transaction-api\1.2\javax.transaction-api-1.2.jar;C:\Users\OneOnePeng.m2\repository\org\springframework\data\spring-data-jpa\1.11.3.RELEASE\spring-data-jpa-1.11.3.RELEASE.jar;C:\Users\OneOnePeng.m2\repository\org\springframework\data\spring-data-commons\1.13.3.RELEASE\spring-data-commons-1.13.3.RELEASE.jar;C:\Users\OneOnePeng.m2\repository\org\springframework\spring-orm\4.3.8.RELEASE\spring-orm-4.3.8.RELEASE.jar;C:\Users\OneOnePeng.m2\repository\org\springframework\spring-tx\4.3.8.RELEASE\spring-tx-4.3.8.RELEASE.jar;C:\Users\OneOnePeng.m2\repository\org\slf4j\jcl-over-slf4j\1.7.25\jcl-over-slf4j-1.7.25.jar;C:\Users\OneOnePeng.m2\repository\org\springframework\spring-aspects\4.3.8.RELEASE\spring-aspects-4.3.8.RELEASE.jar;C:\Users\OneOnePeng.m2\repository\junit\junit\4.12\junit-4.12.jar;C:\Users\OneOnePeng.m2\repository\org\junit\jupiter\junit-jupiter\5.6.0-M1\junit-jupiter-5.6.0-M1.jar;C:\Users\OneOnePeng.m2\repository\org\junit\jupiter\junit-jupiter-api\5.6.0-M1\junit-jupiter-api-5.6.0-M1.jar;C:\Users\OneOnePeng.m2\repository\org\apiguardian\apiguardian-api\1.1.0\apiguardian-api-1.1.0.jar;C:\Users\OneOnePeng.m2\repository\org\opentest4j\opentest4j\1.2.0\opentest4j-1.2.0.jar;C:\Users\OneOnePeng.m2\repository\org\junit\platform\junit-platform-commons\1.6.0-M1\junit-platform-commons-1.6.0-M1.jar;C:\Users\OneOnePeng.m2\repository\org\junit\jupiter\junit-jupiter-params\5.6.0-M1\junit-jupiter-params-5.6.0-M1.jar;C:\Users\OneOnePeng.m2\repository\org\junit\jupiter\junit-jupiter-engine\5.6.0-M1\junit-jupiter-engine-5.6.0-M1.jar;C:\Users\OneOnePeng.m2\repository\org\junit\platform\junit-platform-engine\1.6.0-M1\junit-platform-engine-1.6.0-M1.jar;C:\Users\OneOnePeng.m2\repository\org\projectlombok\lombok\1.16.16\lombok-1.16.16.jar;C:\Users\OneOnePeng.m2\repository\org\jetbrains\annotations\18.0.0\annotations-18.0.0.jar” com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 -junit4 com.imooc.sell.repository.ProductInfoRepositoryTest,findByProductStatus
02:37:23.983 [main] DEBUG org.springframework.test.context.junit4.SpringJUnit4ClassRunner - SpringJUnit4ClassRunner constructor called with [class com.imooc.sell.repository.ProductInfoRepositoryTest]
02:37:23.991 [main] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating CacheAwareContextLoaderDelegate from class [org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate]
02:37:24.002 [main] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating BootstrapContext using constructor [public org.springframework.test.context.support.DefaultBootstrapContext(java.lang.Class,org.springframework.test.context.CacheAwareContextLoaderDelegate)]
02:37:24.028 [main] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating TestContextBootstrapper for test class [com.imooc.sell.repository.ProductInfoRepositoryTest] from class [org.springframework.boot.test.context.SpringBootTestContextBootstrapper]
02:37:24.053 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Neither @ContextConfiguration nor @ContextHierarchy found for test class [com.imooc.sell.repository.ProductInfoRepositoryTest], using SpringBootContextLoader
02:37:24.061 [main] DEBUG org.springframework.test.context.support.AbstractContextLoader - Did not detect default resource location for test class [com.imooc.sell.repository.ProductInfoRepositoryTest]: class path resource [com/imooc/sell/repository/ProductInfoRepositoryTest-context.xml] does not exist
02:37:24.062 [main] DEBUG org.springframework.test.context.support.AbstractContextLoader - Did not detect default resource location for test class [com.imooc.sell.repository.ProductInfoRepositoryTest]: class path resource [com/imooc/sell/repository/ProductInfoRepositoryTestContext.groovy] does not exist
02:37:24.062 [main] INFO org.springframework.test.context.support.AbstractContextLoader - Could not detect default resource locations for test class [com.imooc.sell.repository.ProductInfoRepositoryTest]: no resource found for suffixes {-context.xml, Context.groovy}.
02:37:24.063 [main] INFO org.springframework.test.context.support.AnnotationConfigContextLoaderUtils - Could not detect default configuration classes for test class [com.imooc.sell.repository.ProductInfoRepositoryTest]: ProductInfoRepositoryTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration.
02:37:24.124 [main] DEBUG org.springframework.test.context.support.ActiveProfilesUtils - Could not find an ‘annotation declaring class’ for annotation type [org.springframework.test.context.ActiveProfiles] and class [com.imooc.sell.repository.ProductInfoRepositoryTest]
02:37:24.136 [main] DEBUG org.springframework.core.env.StandardEnvironment - Adding [systemProperties] PropertySource with lowest search precedence
02:37:24.137 [main] DEBUG org.springframework.core.env.StandardEnvironment - Adding [systemEnvironment] PropertySource with lowest search precedence
02:37:24.137 [main] DEBUG org.springframework.core.env.StandardEnvironment - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
02:37:24.153 [main] DEBUG org.springframework.core.io.support.PathMatchingResourcePatternResolver - Resolved classpath location [com/imooc/sell/repository/] to resources [URL [file:/D:/MyWorld/sell_2_16/target/test-classes/com/imooc/sell/repository/], URL [file:/D:/MyWorld/sell_2_16/target/classes/com/imooc/sell/repository/]]
02:37:24.153 [main] DEBUG org.springframework.core.io.support.PathMatchingResourcePatternResolver - Looking for matching resources in directory tree [D:\MyWorld\sell_2_16\target\test-classes\com\imooc\sell\repository]
02:37:24.154 [main] DEBUG org.springframework.core.io.support.PathMatchingResourcePatternResolver - Searching directory [D:\MyWorld\sell_2_16\target\test-classes\com\imooc\sell\repository] for files matching pattern [D:/MyWorld/sell_2_16/target/test-classes/com/imooc/sell/repository/.class]
02:37:24.159 [main] DEBUG org.springframework.core.io.support.PathMatchingResourcePatternResolver - Looking for matching resources in directory tree [D:\MyWorld\sell_2_16\target\classes\com\imooc\sell\repository]
02:37:24.159 [main] DEBUG org.springframework.core.io.support.PathMatchingResourcePatternResolver - Searching directory [D:\MyWorld\sell_2_16\target\classes\com\imooc\sell\repository] for files matching pattern [D:/MyWorld/sell_2_16/target/classes/com/imooc/sell/repository/.class]
02:37:24.160 [main] DEBUG org.springframework.core.io.support.PathMatchingResourcePatternResolver - Resolved location pattern [classpath*:com/imooc/sell/repository/.class] to resources [file [D:\MyWorld\sell_2_16\target\test-classes\com\imooc\sell\repository\ProductCategoryRepositoryTest.class], file [D:\MyWorld\sell_2_16\target\test-classes\com\imooc\sell\repository\ProductInfoRepositoryTest.class], file [D:\MyWorld\sell_2_16\target\classes\com\imooc\sell\repository\ProductCategoryRepository.class], file [D:\MyWorld\sell_2_16\target\classes\com\imooc\sell\repository\ProductInfoRepository.class]]
02:37:24.187 [main] DEBUG org.springframework.core.io.support.PathMatchingResourcePatternResolver - Resolved classpath location [com/imooc/sell/] to resources [URL [file:/D:/MyWorld/sell_2_16/target/test-classes/com/imooc/sell/], URL [file:/D:/MyWorld/sell_2_16/target/classes/com/imooc/sell/]]
02:37:24.187 [main] DEBUG org.springframework.core.io.support.PathMatchingResourcePatternResolver - Looking for matching resources in directory tree [D:\MyWorld\sell_2_16\target\test-classes\com\imooc\sell]
02:37:24.188 [main] DEBUG org.springframework.core.io.support.PathMatchingResourcePatternResolver - Searching directory [D:\MyWorld\sell_2_16\target\test-classes\com\imooc\sell] for files matching pattern [D:/MyWorld/sell_2_16/target/test-classes/com/imooc/sell/.class]
02:37:24.189 [main] DEBUG org.springframework.core.io.support.PathMatchingResourcePatternResolver - Looking for matching resources in directory tree [D:\MyWorld\sell_2_16\target\classes\com\imooc\sell]
02:37:24.189 [main] DEBUG org.springframework.core.io.support.PathMatchingResourcePatternResolver - Searching directory [D:\MyWorld\sell_2_16\target\classes\com\imooc\sell] for files matching pattern [D:/MyWorld/sell_2_16/target/classes/com/imooc/sell/.class]
02:37:24.194 [main] DEBUG org.springframework.core.io.support.PathMatchingResourcePatternResolver - Resolved location pattern [classpath:com/imooc/sell/*.class] to resources [file [D:\MyWorld\sell_2_16\target\test-classes\com\imooc\sell\LoggerTest.class], file [D:\MyWorld\sell_2_16\target\test-classes\com\imooc\sell\LoggerTest2.class], file [D:\MyWorld\sell_2_16\target\test-classes\com\imooc\sell\SellApplicationTests.class], file [D:\MyWorld\sell_2_16\target\classes\com\imooc\sell\SellApplication.class]]
02:37:24.306 [main] DEBUG org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider - Identified candidate component class: file [D:\MyWorld\sell_2_16\target\classes\com\imooc\sell\SellApplication.class]
02:37:24.307 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Found @SpringBootConfiguration com.imooc.sell.SellApplication for test class com.imooc.sell.repository.ProductInfoRepositoryTest
02:37:24.317 [main] DEBUG org.springframework.boot.test.context.SpringBootTestContextBootstrapper - @TestExecutionListeners is not present for class [com.imooc.sell.repository.ProductInfoRepositoryTest]: using defaults.
02:37:24.324 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Loaded default TestExecutionListener class names from location [META-INF/spring.factories]: [org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener, org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener, 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:37:24.355 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Using TestExecutionListeners: [org.springframework.test.context.web.ServletTestExecutionListener@1442d7b5, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@1efee8e7, org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecutionListener@1ee807c6, org.springframework.test.context.support.DirtiesContextTestExecutionListener@76a4d6c, org.springframework.test.context.transaction.TransactionalTestExecutionListener@517cd4b, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener@6cc7b4de, org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener@32cf48b7, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener@679b62af, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener@5cdd8682, org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener@d6da883, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener@45afc369, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener@799d4f69]
02:37:24.357 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [com.imooc.sell.repository.ProductInfoRepositoryTest]
02:37:24.357 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [com.imooc.sell.repository.ProductInfoRepositoryTest]
02:37:24.369 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [com.imooc.sell.repository.ProductInfoRepositoryTest]
02:37:24.369 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [com.imooc.sell.repository.ProductInfoRepositoryTest]
02:37:24.371 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [com.imooc.sell.repository.ProductInfoRepositoryTest]
02:37:24.371 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [com.imooc.sell.repository.ProductInfoRepositoryTest]
02:37:24.372 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [com.imooc.sell.repository.ProductInfoRepositoryTest]
02:37:24.372 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [com.imooc.sell.repository.ProductInfoRepositoryTest]
02:37:24.376 [main] DEBUG org.springframework.test.context.support.AbstractDirtiesContextTestExecutionListener - Before test class: context [DefaultTestContext@49070868 testClass = ProductInfoRepositoryTest, testInstance = [null], testMethod = [null], testException = [null], mergedContextConfiguration = [WebMergedContextConfiguration@6385cb26 testClass = ProductInfoRepositoryTest, locations = ‘{}’, classes = ‘{class com.imooc.sell.SellApplication}’, contextInitializerClasses = ‘[]’, activeProfiles = ‘{}’, propertySourceLocations = ‘{}’, propertySourceProperties = ‘{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}’, contextCustomizers = set[org.springframework.boot.test.context.SpringBootTestContextCustomizer@4b952a2d, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@4bec1f0c, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@4e9ba398], resourceBasePath = ‘src/main/webapp’, contextLoader = ‘org.springframework.boot.test.context.SpringBootContextLoader’, parent = [null]]], class annotated with @DirtiesContext [false] with mode [null].
02:37:24.377 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [com.imooc.sell.repository.ProductInfoRepositoryTest]
02:37:24.377 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [com.imooc.sell.repository.ProductInfoRepositoryTest]
02:37:24.481 [main] DEBUG org.springframework.core.env.StandardEnvironment - Adding [systemProperties] PropertySource with lowest search precedence
02:37:24.481 [main] DEBUG org.springframework.core.env.StandardEnvironment - Adding [systemEnvironment] PropertySource with lowest search precedence
02:37:24.481 [main] DEBUG org.springframework.core.env.StandardEnvironment - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
02:37:24.482 [main] DEBUG org.springframework.core.env.MutablePropertySources - Adding [inline] PropertySource with highest search precedence
02:37:24.491 [main] DEBUG org.springframework.test.context.support.TestPropertySourceUtils - Adding inlined properties to environment: {spring.jmx.enabled=false, org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true, server.port=-1}
02:37:24.491 [main] DEBUG org.springframework.core.env.StandardEnvironment - Adding [Inlined Test Properties] PropertySource with highest search precedence
. ____ _ __ _ _
/\ / ’ __ _ () __ __ _ \ \ \
( ( )__ | '_ | '| | ’ / ` | \ \ \
\/ )| |)| | | | | || (| | ) ) ) )
’ || .__|| ||| |__, | / / / /
=|_|======|/=////
:: Spring Boot :: (v1.5.3.RELEASE)
2020-02-17 02:37:25,246 - Starting ProductInfoRepositoryTest on DESKTOP-9LHABAL with PID 5740 (started by OneOnePeng in D:\MyWorld\sell_2_16)
2020-02-17 02:37:25,249 - No active profile set, falling back to default profiles: default
2020-02-17 02:37:25,347 - Refreshing org.springframework.web.context.support.GenericWebApplicationContext@3f4faf53: startup date [Mon Feb 17 02:37:25 CST 2020]; root of context hierarchy
2020-02-17 02:37:26,479 - HV000001: Hibernate Validator 5.3.5.Final
2020-02-17 02:37:29,353 - Building JPA container EntityManagerFactory for persistence unit 'default’
2020-02-17 02:37:29,377 - HHH000204: Processing PersistenceUnitInfo [
name: default
…]
2020-02-17 02:37:29,482 - HHH000412: Hibernate Core {5.0.12.Final}
2020-02-17 02:37:29,484 - HHH000206: hibernate.properties not found
2020-02-17 02:37:29,486 - HHH000021: Bytecode provider name : javassist
2020-02-17 02:37:29,544 - HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
2020-02-17 02:37:29,710 - HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
2020-02-17 02:37:31,035 - Initialized JPA EntityManagerFactory for persistence unit 'default’
2020-02-17 02:37:32,075 - Looking for @ControllerAdvice: org.springframework.web.context.support.GenericWebApplicationContext@3f4faf53: startup date [Mon Feb 17 02:37:25 CST 2020]; root of context hierarchy
2020-02-17 02:37:32,186 - Mapped “{[/error]}” onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2020-02-17 02:37:32,187 - Mapped “{[/error],produces=[text/html]}” onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2020-02-17 02:37:32,248 - Mapped URL path [/webjars/] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2020-02-17 02:37:32,248 - Mapped URL path [/] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2020-02-17 02:37:32,320 - Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2020-02-17 02:37:32,695 - Started ProductInfoRepositoryTest in 8.189 seconds (JVM running for 9.732)
2020-02-17 02:37:32,783 - HHH000397: Using ASTQueryTranslatorFactory
2020-02-17 02:37:33,003 - Closing org.springframework.web.context.support.GenericWebApplicationContext@3f4faf53: startup date [Mon Feb 17 02:37:25 CST 2020]; root of context hierarchy
2020-02-17 02:37:33,007 - Closing JPA EntityManagerFactory for persistence unit ‘default’
Process finished with exit code 0
1回答
-
廖师兄
2020-02-17
数据库配置不对。
【运行了下老师的代码也是如此】你运行的是哪个tag的代码?
以后发日志要用代码格式
022020-02-19
相似问题