intellij-idea - 无法连接到 Intellij 中的 h2 数据库

标签 intellij-idea h2

我正在努力学习本教程 tutorial在 Intellij IDEA 中,但是当我尝试连接到 h2 数据库时,控制台向我显示错误:

 Connection is broken: "java.net.ConnectException: Connection refused: connect: localhost:9092" 
        java.net.ConnectException: Connection refused: connect.

我需要做什么才能建立连接?

提前致谢

enter image description here

最佳答案

问题出在 url 上,它需要指向您的应用程序的路径: jdbc:h2:file:C:\Users\romul\IdeaProjects\raspberryAwards;MV_STORE=false;AUTO_SERVER=TRUE

关于intellij-idea - 无法连接到 Intellij 中的 h2 数据库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59429530/

相关文章:

intellij-idea - 如何在 PhpStorm 中退出 "Edit as Table"模式?

intellij-idea - 在 IntelliJ 中使当前选项卡全屏显示

junit - 使用 H2 数据库进行单元测试

java - 关于创建交易的 Controller 方法问题

java - JdbcSQLSyntaxErrorException 未找到架构

plugins - 由于 <必需的插件 "org.jetbrains.plugins.remote-run"未安装>,Intellij Idea CE 2016.1 的 Docker 插件安装失败。>

java - 导入 javax.xml.bind.annotation.XmlRootElement 未解析

java - 无法在 Grails 应用程序中加载 OracleDriver

h2 - H2数据库字符串要加时间戳

java - 单元测试有序 SQL 查询