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的更多相关文章

  1. 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 创建 ...

  2. 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 ...

  3. Springboot 之 启动报错-Cannot determine embedded database driver class for database type NONE

    Springboot 之 启动报错-数据库 springboot项目在启动时,报如下错误: Error starting ApplicationContext. To display the auto ...

  4. 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 ...

  5. 【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 ...

  6. mybatis启动报错Mapped Statements collection already contains value for com.autoyol.mapper.trans.TransDispatchingMapper解决

    1.检查sqlsession配置,在applicationContext文件中.检查mybatis配置文件. 2.检查TransDispatchingMapper.java 是接口类,无注解. 3.T ...

  7. Spring boot&Mybatis 启动报错 Failed to auto-configure a DataSource

    *************************** APPLICATION FAILED TO START *************************** Description: Fai ...

  8. Springboot项目启动报错,提示Cannot determine embedded database driver class for database type NONE

    我在springboot项目里面引入了数据库的配置: <dependency> <groupId>org.mybatis.spring.boot</groupId> ...

  9. SpringBoot项目启动报错:java.lang.RuntimeException: java.lang.reflect.InvocationTargetException

    .   ____          _            __ _ _ /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \( ( )\___ | '_ | '_| | ...

  10. springboot项目启动报错

    启动springboot项目报错: NoSuchMethodError: org.apache.tomcat.util.scan.StandardJarScanner.setJarScanFilter ...

随机推荐

  1. .NET 7 来了!!!

    .NET 7 首个RC(发布候选)版本 最近 .Net 的大事件,就是微软发布了.NET 7的首个RC(发布候选)版本,而据微软发布的消息,这是 .NET 7 的最后一个预览版,下一个版本将是第一个候 ...

  2. Linux服务器上MinIO生产部署的内核调优

    #!/bin/bash cat > sysctl.conf <<EOF # maximum number of open files/file descriptors fs.file ...

  3. js内置禁用按钮 disabled

    按钮在监听到disabled后面的布尔值就可以实现是否禁用 一: <button :disabled="book.count <= 1" @click="de ...

  4. 【前端必会】Prettier,有了ESlint,还要Prettier

    介绍 已经安装了ESLint为什么还要Prettier,主要是让ESLint专注于语法相关的验证,检查潜在问题.而代码格式化则有Prettier来接管 对比参考: https://baijiahao. ...

  5. 基于.NetCore开发博客项目 StarBlog - (18) 实现本地Typora文章打包上传

    前言 九月太忙,只更新了三篇文章,本来这个功能是从九月初就开始做的,结果一直拖到现在国庆假期才有时间完善并且写文章~ 之前我更新了几篇关于 Python 的文章,有朋友留言问是不是不更新 .Net 了 ...

  6. TensorFlow搭建模型方式总结

    引言 TensorFlow提供了多种API,使得入门者和专家可以根据自己的需求选择不同的API搭建模型. 基于Keras Sequential API搭建模型 Sequential适用于线性堆叠的方式 ...

  7. 2022-08-12-esp32把玩记-②_用Micropython点ssd1306_oled屏幕

    layout: post cid: 8 title: esp32把玩记-② 用Micropython点ssd1306 oled屏幕 slug: 8 date: 2022/08/12 15:12:39 ...

  8. 齐博x1token字段,请务加在请求地址的头部header

    如下图所示,你必须在请求的头部加上 token参数,主要原因有两个.第一点,这个是登录标志,因为接口访问用不了cookie,所以只能通过这个header请求标志判断用户是否已经登录.第二点,系统有时候 ...

  9. golang中的变量阴影

    索引:https://waterflow.link/articles/1666019023270 在 Go 中,在块中声明的变量名可以在内部块中重新声明. 这种称为变量阴影的原理很容易出现常见错误. ...

  10. vue Excel导入,下载Excel模板,导出Excel

    vue  Excel导入,下载Excel模板,导出Excel vue  Excel导入,下载Excel模板 <template> <div style="display: ...