Consider the following: If you want an embedded database (H2, HSQL or Derby), please put it on the
在配置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相关推荐
- 解决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), ...
- SpringBoot启动错误 If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
需要在pom文件中<build></build中添加如下.来保证文件都能正常被扫描到并且加载成功. <!-- 如果不添加此节点mybatis的mapper.xml文件都会被漏掉 ...
- 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. ...
- 【Java】If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
出现这个问题说明数据库你并没有配置,因此它使用了默认的数据库H2,但是由于你的项目其实已经引入了其他类型的数据库,比如我项目用的就是mysql数据库,然后我也对mysql数据库进行了配置. 但是很明显 ...
- If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
最近学习用springboot使用hsqldb时,碰到了这个问题, 在网上找了好多方法,大多都是这个解决办法: 方法一. 把启动注解改成: @SpringBootApplication(exclude ...
- 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 ...
- spring中使用内存数据库(Embedded database)
内存数据库(Embedded database或in-momery database)具有配置简单.启动速度快.尤其是其可测试性等优点,使其成为开发过程中非常有用的轻量级数据库.在spring中支持H ...
- 解决 springboot 启动报错 -- Cannot determine embedded database driver class for database type NONE
前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,忍不住分享一下给大家.点击跳转到教程. 1. 问题描述 我只是新建一个全新的 springboot 工程,什么都没有写的情况下启动报错如题: ...
- 报错Cannot determine embedded database driver class for database type NONE解决方法
由于我不需要数据库,启动springboot报错: Cannot determine embedded database driver class for database type NONE If ...
最新文章
- ImportError: No module named _ssl解决方法
- Linux 操作命令记录
- python psd_Python psd包_程序模块 - PyPI - Python中文网
- B - 一只小蜜蜂...
- [剑指offer]面试题45:圆圈中最后剩下的数字
- 用于MyBatis CRUD操作的Spring MVC 3控制器
- chdir函数_PHP chdir()函数与示例
- php下载css图片,PHP实现下载CSS文件中的图片
- 服务机器人占领智能安防哪些领域?
- 解决本地工具无法连接服务器上的mysql的问题
- php streamsocketenablecrypto,PHPMailer发送邮件报错Msg:stream_socket_enable_crypto():
- ruby 调用java_利用RJB在Ruby on Rails中使用Java代码的教程
- 第一颗国产HDMI 1.4 至 TTL / 2 端口 LVDS 芯片LT8619C
- dell 7050台式计算机,Dell OptiPlex 7050 系统指南
- 傻瓜式教学——手把手教你电脑三种方式连接打印机
- OpenCV开发笔记(六十七):红胖子8分钟带你深入了解特征点暴力匹配(图文并茂+浅显易懂+程序源码)
- m4s转为mp4实例:使用ffmpeg和批处理将m4s转为mp4
- android手机听广播,RadioTime让你的android也能听收音机
- 线上教育核心竞争力是什么?声网发布在线素质、职业教育解决方案
- ucos OS_ENTER_CRITICAL .