2018-02-01 14:08:03.005 WARN 34600 --- [ main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 1406, SQLState: 22001
2018-02-01 14:08:03.005 ERROR 34600 --- [ main] o.h.engine.jdbc.spi.SqlExceptionHelper : Data truncation: Data too long for column 'name' at row 1
2018-02-01 14:08:03.007 WARN 34600 --- [ main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 1406, SQLState: HY000
2018-02-01 14:08:03.008 WARN 34600 --- [ main] o.h.engine.jdbc.spi.SqlExceptionHelper : Data too long for column 'name' at row 1
2018-02-01 14:08:03.019 INFO 34600 --- [ main] o.s.t.c.transaction.TransactionContext : Rolled back transaction for test context [DefaultTestContext@5a8e6209 testClass = ApplicationTests, testInstance = com.didispace.ApplicationTests@4f970963, testMethod = test@ApplicationTests, testException = org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; nested exception is org.hibernate.exception.DataException: could not execute statement, mergedContextConfiguration = [MergedContextConfiguration@4b4523f8 testClass = ApplicationTests, locations = '{}', classes = '{class com.didispace.Application}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{}', contextLoader = 'org.springframework.boot.test.SpringApplicationContextLoader', parent = [null]]].
2018-02-01 14:08:03.029 INFO 34600 --- [ Thread-2] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@20d28811: startup date [Thu Feb 01 14:07:59 GMT+08:00 2018]; root of context hierarchy
2018-02-01 14:08:03.035 INFO 34600 --- [ Thread-2] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
插入字段name过长,超过数据库表结构字段长度
spring boot 操作mongodb出错:2018-02-01 14:13:21.542 INFO 37436 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@4b5a5ed1: startup date [Thu Feb 01 14:13:21 GMT+08:00 2018]; root of context hierarchy
2018-02-01 14:13:23.308 INFO 37436 --- [ main] com.didispace.ApplicationTests : Started ApplicationTests in 2.102 seconds (JVM running for 2.695)
2018-02-01 14:13:23.526 INFO 37436 --- [ Thread-2] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@4b5a5ed1: startup date [Thu Feb 01 14:13:21 GMT+08:00 2018]; root of context hierarchy
spring boot 操作mongodb出错:2018-02-01 14:13:21.542 INFO 37436 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@4b5a5ed1: startup date [Thu Feb 01 14:13:21 GMT+08:00 2018]; root of context hierarchy
2018-02-01 14:13:23.308 INFO 37436 --- [ main] com.didispace.ApplicationTests : Started ApplicationTests in 2.102 seconds (JVM running for 2.695)
2018-02-01 14:13:23.526 INFO 37436 --- [ Thread-2] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@4b5a5ed1: startup date [Thu Feb 01 14:13:21 GMT+08:00 2018]; root of context hierarchy
检查一下你的数据表吧,某个字段类型不符的问题
2018-02-01 14:08:03.005 ERROR 34600 --- [ main] o.h.engine.jdbc.spi.SqlExceptionHelper : Data truncation: Data too long for column 'name' at row 1