在配置sharding-jdbc中

    spring.shardingsphere.datasource.names=ds0,ds1spring.shardingsphere.datasource.ds0.type=com.zaxxer.hikari.HikariDataSource
spring.shardingsphere.datasource.ds0.driverClassName=com.mysql.jdbc.Driver
spring.shardingsphere.datasource.ds0.jdbcUrl=xxx
spring.shardingsphere.datasource.ds0.username=root
spring.shardingsphere.datasource.ds0.password=xxxxspring.shardingsphere.datasource.ds1.type=com.alibaba.druid.pool.DruidDataSource
spring.shardingsphere.datasource.ds1.driverClassName=com.mysql.jdbc.Driver
spring.shardingsphere.datasource.ds1.url=xxx
spring.shardingsphere.datasource.ds1.username=root
spring.shardingsphere.datasource.ds1.password=xxxxspring.shardingsphere.sharding.tables.t_order.actual-data-nodes=ds$->{0..1}.t_order_$->{1..2}
spring.shardingsphere.sharding.default-database-strategy.inline.sharding-column=user_id
spring.shardingsphere.sharding.default-database-strategy.inline.algorithm-expression=ds$->{user_id % 2}
spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.sharding-column=id
spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.algorithm-expression=t_order_$->{id % 2 +1}mybatis-plus.mapper-locations=classpath*:/mapper/*.xml

出现了Consider the following: If you want an embedded database (H2, HSQL or Derby), please put it on the

     <dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus-boot-starter</artifactId><version>3.4.0</version></dependency>
<!--        <dependency>-->
<!--            <groupId>com.alibaba</groupId>-->
<!--            <artifactId>druid-spring-boot-starter</artifactId>-->
<!--              <version>1.2.8</version>-->
<!--        </dependency>-->

将上面的依赖修改为

 <dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus-boot-starter</artifactId><version>3.4.0</version></dependency><dependency><groupId>com.alibaba</groupId><artifactId>druid</artifactId><version>1.2.8</version></dependency>

或者换成同一hikari数据源/或者druid数据源

Consider the following: If you want an embedded database (H2, HSQL or Derby), please put it on the相关推荐

  1. 解决Action: Consider the following: If you want an embedded database (H2, HSQL or Derby), ple..

    问题 springboot异常Action: Consider the following: If you want an embedded database (H2, HSQL or Derby), ...

  2. SpringBoot启动错误 If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.

    需要在pom文件中<build></build中添加如下.来保证文件都能正常被扫描到并且加载成功. <!-- 如果不添加此节点mybatis的mapper.xml文件都会被漏掉 ...

  3. SpringBoot报错:If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.

    一.Source roots (or source folders)通过这个类指定一个文件夹,你告诉IntelliJ IDEA,这个文件夹及其子文件夹中包含的源代码,可以编译为构建过程的一部分.2. ...

  4. 【Java】If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.

    出现这个问题说明数据库你并没有配置,因此它使用了默认的数据库H2,但是由于你的项目其实已经引入了其他类型的数据库,比如我项目用的就是mysql数据库,然后我也对mysql数据库进行了配置. 但是很明显 ...

  5. If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.

    最近学习用springboot使用hsqldb时,碰到了这个问题, 在网上找了好多方法,大多都是这个解决办法: 方法一. 把启动注解改成: @SpringBootApplication(exclude ...

  6. bug---springboot报错Consider the following: If you want an embedded database (H2, HSQL

    错误描述 Action: Consider the following: If you want an embedded database (H2, HSQL or Derby), please pu ...

  7. spring中使用内存数据库(Embedded database)

    内存数据库(Embedded database或in-momery database)具有配置简单.启动速度快.尤其是其可测试性等优点,使其成为开发过程中非常有用的轻量级数据库.在spring中支持H ...

  8. 解决 springboot 启动报错 -- Cannot determine embedded database driver class for database type NONE

    前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,忍不住分享一下给大家.点击跳转到教程. 1. 问题描述 我只是新建一个全新的 springboot 工程,什么都没有写的情况下启动报错如题: ...

  9. 报错Cannot determine embedded database driver class for database type NONE解决方法

    由于我不需要数据库,启动springboot报错: Cannot determine embedded database driver class for database type NONE If ...

最新文章

  1. ImportError: No module named _ssl解决方法
  2. Linux 操作命令记录
  3. python psd_Python psd包_程序模块 - PyPI - Python中文网
  4. B - 一只小蜜蜂...
  5. [剑指offer]面试题45:圆圈中最后剩下的数字
  6. 用于MyBatis CRUD操作的Spring MVC 3控制器
  7. chdir函数_PHP chdir()函数与示例
  8. php下载css图片,PHP实现下载CSS文件中的图片
  9. 服务机器人占领智能安防哪些领域?
  10. 解决本地工具无法连接服务器上的mysql的问题
  11. php streamsocketenablecrypto,PHPMailer发送邮件报错Msg:stream_socket_enable_crypto():
  12. ruby 调用java_利用RJB在Ruby on Rails中使用Java代码的教程
  13. 第一颗国产HDMI 1.4 至 TTL / 2 端口 LVDS 芯片LT8619C
  14. dell 7050台式计算机,Dell OptiPlex 7050 系统指南
  15. 傻瓜式教学——手把手教你电脑三种方式连接打印机
  16. OpenCV开发笔记(六十七):红胖子8分钟带你深入了解特征点暴力匹配(图文并茂+浅显易懂+程序源码)
  17. m4s转为mp4实例:使用ffmpeg和批处理将m4s转为mp4
  18. android手机听广播,RadioTime让你的android也能听收音机
  19. 线上教育核心竞争力是什么?声网发布在线素质、职业教育解决方案
  20. ucos OS_ENTER_CRITICAL .

热门文章

  1. 汽车价格离群值检测案例
  2. #define s(x) x*x 的计算方法
  3. Microsoft IIS波浪号目录枚举/IIS短文件名枚举漏洞
  4. 工程师和他媳妇儿好玩的对话1——20160704
  5. 迅雷下载器-FDM,看2019新年大电影
  6. windos php7 fast cgi,FAST-CGI解析漏洞拿下网站并提权windows系统服务器
  7. putty 下载地址
  8. 递归皮质网络RCN简单理解
  9. uni-app微信小程序+Java实现百度语音识别
  10. kafka:默认的分区策略