小编Vin*_*yak的帖子

Connecting to H2 database from H2 Console

I have used the below settings in my Application properties file. But still cant see my tables in h2 console.

在此处输入图片说明

application.properties

logging.level.org.springframework.web=INFO
spring.datasource.url=jdbc:h2:mem:challenge;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;MV_STORE=FALSE
spring.datasource.driver-class-name=org.h2.Driver
spring.datasource.schema=classpath:/schema.sql
spring.datasource.data=classpath:/data.sql
spring.h2.console.enabled=true
spring.h2.console.path=/h2
server.port = 8080
Run Code Online (Sandbox Code Playgroud)

I used the string jdbc:h2:mem:challenge;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;MV_STORE=FALSE in the JDBC URL on H2 console to login. Yet i am not seeing any tables

The below is my Graddle file

buildscript {
    ext {
        springBootVersion = '1.4.4.RELEASE'
    }
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
    }
}

apply plugin: 'java'
apply plugin: …
Run Code Online (Sandbox Code Playgroud)

spring h2 spring-boot

4
推荐指数
1
解决办法
1万
查看次数

标签 统计

h2 ×1

spring ×1

spring-boot ×1