Springboot+Mybatis:启动报错 String index out of range: -37
springBoot+Druid+Mybatis :启动错误描述
Error parsing SQL Mapper Configuration. Cause: java.lang.StringIndexOutOfBoundsException: String index out of range: -37
1.UnsatisfiedDependencyException
可能原因之一,这个项目目录有中文:
1.项目目录有文件夹是中文
2.项目所属的层级内外层级有中文
解决简易:将整个项目复制到纯英文目录下,且保证项目内所有文件都是纯英文名称。IDEA重新导入打开
原来我的项目内部全部文件都是纯英文的,但是启动还是错,我查看了项目所在的Windows系统文件位置:G:\谷歌下载\JSP源码\xxxx;发现他的外层是中文目录,于是截切项目到F:\WEBProject\Demohander\xxxx;在IDEA中删除之前的项目,打开新目录下的这个项目,再次启动就没问题了。
整合Durid时也出现了问题:
<!--德鲁伊数据库连接池-->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>1.2.6</version>
</dependency>
Spring Boot 报错org.springframework.jdbc.datasource.embedded.EmbeddedData
解决方式:
- 添加:@EnableAutoConfiguration(exclude = {DruidDataSourceAutoConfigure.class})
- 添加依赖:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
Springboot+Mybatis:启动报错 String index out of range: -37的更多相关文章
- springboot项目启动报错Failed to configure a DataSource: 'url' attribute is not specified and no embedde
springboot项目启动报错Failed to configure a DataSource: 'url' attribute is not specified and no embedde 创建 ...
- springboot测试启动报错java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test
springboot测试启动报错: java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you ne ...
- Springboot 之 启动报错-Cannot determine embedded database driver class for database type NONE
Springboot 之 启动报错-数据库 springboot项目在启动时,报如下错误: Error starting ApplicationContext. To display the auto ...
- Spring Boot 启动报错 Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 37
使用命令 java -jar springBoot.jar 启动项目,结果报错如下: Exception at java.lang.String.substring(String.java:) at ...
- 【spring boot】mybatis启动报错:Consider defining a bean of type 'com.newhope.interview.dao.UserMapper' in your configuration. 【Mapper类不能被找到】@Mapper 和@MapperScan注解的区别
启动报错: 2018-05-16 17:22:58.161 ERROR 4080 --- Disconnected from the target VM, address: '127.0.0.1:50 ...
- mybatis启动报错Mapped Statements collection already contains value for com.autoyol.mapper.trans.TransDispatchingMapper解决
1.检查sqlsession配置,在applicationContext文件中.检查mybatis配置文件. 2.检查TransDispatchingMapper.java 是接口类,无注解. 3.T ...
- Spring boot&Mybatis 启动报错 Failed to auto-configure a DataSource
*************************** APPLICATION FAILED TO START *************************** Description: Fai ...
- Springboot项目启动报错,提示Cannot determine embedded database driver class for database type NONE
我在springboot项目里面引入了数据库的配置: <dependency> <groupId>org.mybatis.spring.boot</groupId> ...
- SpringBoot项目启动报错:java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
. ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \( ( )\___ | '_ | '_| | ...
- springboot项目启动报错
启动springboot项目报错: NoSuchMethodError: org.apache.tomcat.util.scan.StandardJarScanner.setJarScanFilter ...
随机推荐
- 华南理工大学 Python第6章课后测验-2
1.(单选)以下关于语句 a = [1,2,3,(4,5)]的说法中,正确的个数有( )个.(1)a是元组类型 (2)a是列表类型 (3)a有5个元素 (4)a有4个元素(5)a[1] ...
- WSUS下载速度和BITS服务
近日,新装了一台WSUS服务器.选择好需要同步的补丁类型和语言版本后开始等待同步.通过过程异常缓慢,速度一直上不去.同步了一整天才30G,同步3T数据需要100天.这样肯定没办法用,所以要想办法提高下 ...
- (数据科学学习手札142)dill:Python中增强版的pickle
本文示例代码已上传至我的Github仓库https://github.com/CNFeffery/DataScienceStudyNotes 1 简介 大家好我是费老师,相信不少读者朋友们都在Pyth ...
- elementUI中page(分页)的使用方法
HTML部分 <!-- 快捷键 page-div --> <el-pagination background layout="sizes,prev, pager, next ...
- Elasticsearch启动https访问
Elasticsearch上操作 前提:已设置密码访问 ./bin/elasticsearch-certutil ca # 生成elastic-stack-ca.p12文件 ./bin/elastic ...
- 使用Filebeat传送多行日志
文章转载自:https://blog.csdn.net/UbuntuTouch/article/details/106272704 在解决应用程序问题时,多行日志为开发人员提供了宝贵的信息. 堆栈跟踪 ...
- Alertmanager 概念与配置深入介绍
文章转载自:https://www.cnblogs.com/gered/p/13496950.html 警报一直是整个监控系统中的重要组成部分,Prometheus监控系统中,采集与警报是分离的. 报 ...
- Docker Compose的安装及命令补全
安装Compose Compose的安装有多种方式,例如通过shell安装.通过pip安装.以及将compose作为容器安装等等.本文讲解通过shell安装的方式.其他安装方式如有兴趣,可以查看Doc ...
- while循环控制
基本语法 例(输出五句hello): int i = 1; //循环变量初始化 while(i<=5){ //循环条件 printf("\n hello!"); //循环语句 ...
- 简书是如何把用户wo逼疯的
趁验证码还有一分钟时间,吐槽一下简书. 准备开始在简书写文章,遇到一些问题. 一.markdown的问题 1.不支持html 2....... 二.绑定手机--这是一个bug 我原来是使用邮箱注册的, ...