I have following datasource configuration in application.yml (Micronaut defaults):
datasources:
default:
url: jdbc:h2:mem:devDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
driverClassName: org.h2.Driver
username: 'user'
password: 'user'
schema-generate: CREATE_DROP
dialect: H2
jpa.default.properties.hibernate.hbm2ddl.auto: update
Hikari logs following:
21:09:01.750 [main] DEBUG com.zaxxer.hikari.HikariConfig - jdbcUrl.........................jdbc:h2:mem:devDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
Which seems to be correct. I attempt to connect to the database, and succeed. Hovever SHOW TABLES
returns nothing. When I add IFEXISTS=true
to url, I get the following error:
[90146][90146] Database "mem:devDb" not found, and IFEXISTS=true, so we cant auto-create it [90146-200].
The application is working - I can insert and fetch data, but I don't have a clue where the data is located, and how to access it outside the app.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…