Cannot determine embedded database driver class for database type NONE2022-11-05


APPLICATION FAILED TO START


Description:

Cannot determine embedded database driver class for database type NONE

Action:

If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (the profiles "dev" are currently active).

Disconnected from the target VM, address: '127.0.0.1:62270', transport: 'socket'

这个错误说的是,spring 定义了数据源的 bean,但没有配置 spring.datasource.url 之类的参数,所以加载数据源 bean 失败了
要处理有两种办法:

  1. 想办法让 spring 不要加载 datasource
  2. 配置一个 h2 内存数据库,假装有一个 datasource
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容