SpringBoot—MyBatis整合报错01:Input length = 1
报错详情:
"C:\Program Files\Java\jdk1.8.0_202\bin\" -XX:TieredStopAtLevel=1 -noverify -=always - -=true - -=true -javaagent:D:\Work\programming\IDEA2020.1.1\lib\idea_rt.jar=3585:D:\Work\programming\IDEA2020.1.1\bin -=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_202\jre\lib\;C:\Program Files\Java\jdk1.8.0_202\jre\lib\;C:\Program Files\Java\jdk1.8.0_202\jre\lib\ext\;C:\Program Files\Java\jdk1.8.0_202\jre\lib\ext\;C:\Program Files\Java\jdk1.8.0_202\jre\lib\ext\;C:\Program Files\Java\jdk1.8.0_202\jre\lib\ext\;C:\Program Files\Java\jdk1.8.0_202\jre\lib\ext\;C:\Program Files\Java\jdk1.8.0_202\jre\lib\ext\;C:\Program Files\Java\jdk1.8.0_202\jre\lib\ext\;C:\Program Files\Java\jdk1.8.0_202\jre\lib\ext\;C:\Program Files\Java\jdk1.8.0_202\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_202\jre\lib\ext\;C:\Program Files\Java\jdk1.8.0_202\jre\lib\ext\;C:\Program Files\Java\jdk1.8.0_202\jre\lib\ext\;C:\Program Files\Java\jdk1.8.0_202\jre\lib\;C:\Program Files\Java\jdk1.8.0_202\jre\lib\;C:\Program Files\Java\jdk1.8.0_202\jre\lib\;C:\Program Files\Java\jdk1.8.0_202\jre\lib\;C:\Program Files\Java\jdk1.8.0_202\jre\lib\;C:\Program Files\Java\jdk1.8.0_202\jre\lib\;C:\Program Files\Java\jdk1.8.0_202\jre\lib\;C:\Program Files\Java\jdk1.8.0_202\jre\lib\;C:\Program Files\Java\jdk1.8.0_202\jre\lib\;E:\demo\spring-boot-mybatis-01\target\classes;C:\Users\QIAO\.m2\repository\org\springframework\boot\spring-boot-starter-web\2.3.\spring-boot-starter-web-2.3.;C:\Users\QIAO\.m2\repository\org\springframework\boot\spring-boot-starter\2.3.\spring-boot-starter-2.3.;C:\Users\QIAO\.m2\repository\org\springframework\boot\spring-boot\2.3.\spring-boot-2.3.;C:\Users\QIAO\.m2\repository\org\springframework\boot\spring-boot-autoconfigure\2.3.\spring-boot-autoconfigure-2.3.;C:\Users\QIAO\.m2\repository\org\springframework\boot\spring-boot-starter-logging\2.3.\spring-boot-starter-logging-2.3.;C:\Users\QIAO\.m2\repository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.;C:\Users\QIAO\.m2\repository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.;C:\Users\QIAO\.m2\repository\org\apache\logging\log4j\log4j-to-slf4j\2.13.2\log4j-to-slf4j-2.13.;C:\Users\QIAO\.m2\repository\org\apache\logging\log4j\log4j-api\2.13.2\log4j-api-2.13.;C:\Users\QIAO\.m2\repository\org\slf4j\jul-to-slf4j\1.7.30\jul-to-slf4j-1.7.;C:\Users\QIAO\.m2\repository\jakarta\annotation\-api\1.3.5\-api-1.3.;C:\Users\QIAO\.m2\repository\org\yaml\snakeyaml\1.26\snakeyaml-1.;C:\Users\QIAO\.m2\repository\org\springframework\boot\spring-boot-starter-json\2.3.\spring-boot-starter-json-2.3.;C:\Users\QIAO\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.11.0\jackson-databind-2.11.;C:\Users\QIAO\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.11.0\jackson-annotations-2.11.;C:\Users\QIAO\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.11.0\jackson-core-2.11.;C:\Users\QIAO\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.11.0\jackson-datatype-jdk8-2.11.;C:\Users\QIAO\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.11.0\jackson-datatype-jsr310-2.11.;C:\Users\QIAO\.m2\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.11.0\jackson-module-parameter-names-2.11.;C:\Users\QIAO\.m2\repository\org\springframework\boot\spring-boot-starter-tomcat\2.3.\spring-boot-starter-tomcat-2.3.;C:\Users\QIAO\.m2\repository\org\apache\tomcat\embed\tomcat-embed-core\9.0.35\tomcat-embed-core-9.0.;C:\Users\QIAO\.m2\repository\org\glassfish\\3.0.3\-3.0.;C:\Users\QIAO\.m2\repository\org\apache\tomcat\embed\tomcat-embed-websocket\9.0.35\tomcat-embed-websocket-9.0.;C:\Users\QIAO\.m2\repository\org\springframework\spring-web\5.2.\spring-web-5.2.;C:\Users\QIAO\.m2\repository\org\springframework\spring-beans\5.2.\spring-beans-5.2.;C:\Users\QIAO\.m2\repository\org\springframework\spring-webmvc\5.2.\spring-webmvc-5.2.;C:\Users\QIAO\.m2\repository\org\springframework\spring-aop\5.2.\spring-aop-5.2.;C:\Users\QIAO\.m2\repository\org\springframework\spring-context\5.2.\spring-context-5.2.;C:\Users\QIAO\.m2\repository\org\springframework\spring-expression\5.2.\spring-expression-5.2.;C:\Users\QIAO\.m2\repository\org\mybatis\spring\boot\mybatis-spring-boot-starter\2.1.2\mybatis-spring-boot-starter-2.1.;C:\Users\QIAO\.m2\repository\org\springframework\boot\spring-boot-starter-jdbc\2.3.\spring-boot-starter-jdbc-2.3.;C:\Users\QIAO\.m2\repository\com\zaxxer\HikariCP\3.4.5\HikariCP-3.4.;C:\Users\QIAO\.m2\repository\org\springframework\spring-jdbc\5.2.\spring-jdbc-5.2.;C:\Users\QIAO\.m2\repository\org\springframework\spring-tx\5.2.\spring-tx-5.2.;C:\Users\QIAO\.m2\repository\org\mybatis\spring\boot\mybatis-spring-boot-autoconfigure\2.1.2\mybatis-spring-boot-autoconfigure-2.1.;C:\Users\QIAO\.m2\repository\org\mybatis\mybatis\3.5.4\mybatis-3.5.;C:\Users\QIAO\.m2\repository\org\mybatis\mybatis-spring\2.0.4\mybatis-spring-2.0.;C:\Users\QIAO\.m2\repository\mysql\mysql-connector-java\8.0.20\mysql-connector-java-8.0.;C:\Users\QIAO\.m2\repository\org\slf4j\slf4j-api\1.7.30\slf4j-api-1.7.;C:\Users\QIAO\.m2\repository\org\springframework\spring-core\5.2.\spring-core-5.2.;C:\Users\QIAO\.m2\repository\org\springframework\spring-jcl\5.2.\spring-jcl-5.2." .SpringBootMybatis01Application
20:44:07.052 [main] DEBUG - Application failed to start with classpath: [file:/C:/Program%20Files/Java/jdk1.8.0_202/jre/lib/, file:/C:/Program%20Files/Java/jdk1.8.0_202/jre/lib/, file:/C:/Program%20Files/Java/jdk1.8.0_202/jre/lib/ext/, file:/C:/Program%20Files/Java/jdk1.8.0_202/jre/lib/ext/, file:/C:/Program%20Files/Java/jdk1.8.0_202/jre/lib/ext/, file:/C:/Program%20Files/Java/jdk1.8.0_202/jre/lib/ext/, file:/C:/Program%20Files/Java/jdk1.8.0_202/jre/lib/ext/, file:/C:/Program%20Files/Java/jdk1.8.0_202/jre/lib/ext/, file:/C:/Program%20Files/Java/jdk1.8.0_202/jre/lib/ext/, file:/C:/Program%20Files/Java/jdk1.8.0_202/jre/lib/ext/, file:/C:/Program%20Files/Java/jdk1.8.0_202/jre/lib/ext/sunjce_provider.jar, file:/C:/Program%20Files/Java/jdk1.8.0_202/jre/lib/ext/, file:/C:/Program%20Files/Java/jdk1.8.0_202/jre/lib/ext/, file:/C:/Program%20Files/Java/jdk1.8.0_202/jre/lib/ext/, file:/C:/Program%20Files/Java/jdk1.8.0_202/jre/lib/, file:/C:/Program%20Files/Java/jdk1.8.0_202/jre/lib/, file:/C:/Program%20Files/Java/jdk1.8.0_202/jre/lib/, file:/C:/Program%20Files/Java/jdk1.8.0_202/jre/lib/, file:/C:/Program%20Files/Java/jdk1.8.0_202/jre/lib/, file:/C:/Program%20Files/Java/jdk1.8.0_202/jre/lib/, file:/C:/Program%20Files/Java/jdk1.8.0_202/jre/lib/, file:/C:/Program%20Files/Java/jdk1.8.0_202/jre/lib/, file:/C:/Program%20Files/Java/jdk1.8.0_202/jre/lib/, file:/E:/demo/spring-boot-mybatis-01/target/classes/, file:/C:/Users/QIAO/.m2/repository/org/springframework/boot/spring-boot-starter-web/2.3./spring-boot-starter-web-2.3., file:/C:/Users/QIAO/.m2/repository/org/springframework/boot/spring-boot-starter/2.3./spring-boot-starter-2.3., file:/C:/Users/QIAO/.m2/repository/org/springframework/boot/spring-boot/2.3./spring-boot-2.3., file:/C:/Users/QIAO/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/2.3./spring-boot-autoconfigure-2.3., file:/C:/Users/QIAO/.m2/repository/org/springframework/boot/spring-boot-starter-logging/2.3./spring-boot-starter-logging-2.3., file:/C:/Users/QIAO/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2., file:/C:/Users/QIAO/.m2/repository/ch/qos/logback/logback-core/1.2.3/logback-core-1.2., file:/C:/Users/QIAO/.m2/repository/org/apache/logging/log4j/log4j-to-slf4j/2.13.2/log4j-to-slf4j-2.13., file:/C:/Users/QIAO/.m2/repository/org/apache/logging/log4j/log4j-api/2.13.2/log4j-api-2.13., file:/C:/Users/QIAO/.m2/repository/org/slf4j/jul-to-slf4j/1.7.30/jul-to-slf4j-1.7., file:/C:/Users/QIAO/.m2/repository/jakarta/annotation/-api/1.3.5/-api-1.3., file:/C:/Users/QIAO/.m2/repository/org/yaml/snakeyaml/1.26/snakeyaml-1., file:/C:/Users/QIAO/.m2/repository/org/springframework/boot/spring-boot-starter-json/2.3./spring-boot-starter-json-2.3., file:/C:/Users/QIAO/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.11.0/jackson-databind-2.11., file:/C:/Users/QIAO/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.11.0/jackson-annotations-2.11., file:/C:/Users/QIAO/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.11.0/jackson-core-2.11., file:/C:/Users/QIAO/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.11.0/jackson-datatype-jdk8-2.11., file:/C:/Users/QIAO/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.11.0/jackson-datatype-jsr310-2.11., file:/C:/Users/QIAO/.m2/repository/com/fasterxml/jackson/module/jackson-module-parameter-names/2.11.0/jackson-module-parameter-names-2.11., file:/C:/Users/QIAO/.m2/repository/org/springframework/boot/spring-boot-starter-tomcat/2.3./spring-boot-starter-tomcat-2.3., file:/C:/Users/QIAO/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.35/tomcat-embed-core-9.0., file:/C:/Users/QIAO/.m2/repository/org/glassfish//3.0.3/-3.0., file:/C:/Users/QIAO/.m2/repository/org/apache/tomcat/embed/tomcat-embed-websocket/9.0.35/tomcat-embed-websocket-9.0., file:/C:/Users/QIAO/.m2/repository/org/springframework/spring-web/5.2./spring-web-5.2., file:/C:/Users/QIAO/.m2/repository/org/springframework/spring-beans/5.2./spring-beans-5.2., file:/C:/Users/QIAO/.m2/repository/org/springframework/spring-webmvc/5.2./spring-webmvc-5.2., file:/C:/Users/QIAO/.m2/repository/org/springframework/spring-aop/5.2./spring-aop-5.2., file:/C:/Users/QIAO/.m2/repository/org/springframework/spring-context/5.2./spring-context-5.2., file:/C:/Users/QIAO/.m2/repository/org/springframework/spring-expression/5.2./spring-expression-5.2., file:/C:/Users/QIAO/.m2/repository/org/mybatis/spring/boot/mybatis-spring-boot-starter/2.1.2/mybatis-spring-boot-starter-2.1., file:/C:/Users/QIAO/.m2/repository/org/springframework/boot/spring-boot-starter-jdbc/2.3./spring-boot-starter-jdbc-2.3., file:/C:/Users/QIAO/.m2/repository/com/zaxxer/HikariCP/3.4.5/HikariCP-3.4., file:/C:/Users/QIAO/.m2/repository/org/springframework/spring-jdbc/5.2./spring-jdbc-5.2., file:/C:/Users/QIAO/.m2/repository/org/springframework/spring-tx/5.2./spring-tx-5.2., file:/C:/Users/QIAO/.m2/repository/org/mybatis/spring/boot/mybatis-spring-boot-autoconfigure/2.1.2/mybatis-spring-boot-autoconfigure-2.1., file:/C:/Users/QIAO/.m2/repository/org/mybatis/mybatis/3.5.4/mybatis-3.5., file:/C:/Users/QIAO/.m2/repository/org/mybatis/mybatis-spring/2.0.4/mybatis-spring-2.0., file:/C:/Users/QIAO/.m2/repository/mysql/mysql-connector-java/8.0.20/mysql-connector-java-8.0., file:/C:/Users/QIAO/.m2/repository/org/slf4j/slf4j-api/1.7.30/slf4j-api-1.7., file:/C:/Users/QIAO/.m2/repository/org/springframework/spring-core/5.2./spring-core-5.2., file:/C:/Users/QIAO/.m2/repository/org/springframework/spring-jcl/5.2./spring-jcl-5.2., file:/D:/Work/programming/IDEA2020.1.1/lib/idea_rt.jar]
20:44:07.117 [main] ERROR - Application run failed
: Failed to load property source from 'file:/E:/demo/spring-boot-mybatis-01/target/classes/' (classpath:/)
at $(:554)
at $(:499)
at $(:469)
at $$null$7(:448)
at (:75)
at $$load$8(:448)
at (:75)
at $(:445)
at $$load$0(:348)
at (:54)
at $(:336)
at (:226)
at (:210)
at (:200)
at (:188)
at (:172)
at (:165)
at (:139)
at (:127)
at (:80)
at (:53)
at (:345)
at (:308)
at (:1237)
at (:1226)
at .(:24)
Caused by: : : Input length = 1
at (:218)
at (:176)
at (:171)
at (:126)
at (:1177)
at (:287)
at (:227)
at $(:195)
at (:158)
at (:148)
at (:82)
at (:123)
at $(:489)
at (:160)
at (:134)
at (:75)
at (:50)
at $(:608)
at $(:524)
... 25 common frames omitted
Caused by: : Input length = 1
at (:281)
at (:339)
at (:178)
at (:184)
at (:125)
at (:183)
... 43 common frames omitted
Process finished with exit code 1
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
问题一:
Caused by: : Input length = 1
分析: 配置文件编码格式不对。
解决方法: 修改配置文件的编码格式。
详细步骤: file—>settings—>Edit---->File Encodings 修改配置文件的编码格式。
修改之后重启项目解决问题,看来其他的jar包报错,也是因为配置文件编码格式不是UTF-8导致的。