How do you connect to H2 as a remote database instead of embedded mode using Spring Boot?
问题 I have this configuration under src/main/resources for my little Spring Boot application: server.port = 8090 spring.datasource.driverClassName = org.h2.Driver spring.datasource.url = jdbc:h2:file:~/stapler I know this configuration is picked up properly, cause there is valid port number 8090 in application startup log. There is also a @PostConstruct initDb() method which creates and inserts data into 2 tables of that database: package com.avk.stapler.init; import org.springframework.beans