Я пытаюсь настроить H2 как базу данных в памяти.Я настроил его как:
spring:
profiles: qa
datasource:
#url: jdbc:h2:mem:testdb;MODE=MySQL;DB_CLOSE_ON_EXIT=FALSE;INIT=CREATE SCHEMA IF NOT EXISTS "public"
jdbc-url: jdbc:mysql://localhost:3306/lisdashboard
username: '@lisdashboard.db.username@'
password: '@lisdashboard.db.password@'
h2:
console:
path: /admin/h2-console
Однако я получаю эту ошибку при попытке запустить его
- Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Driver org.h2.Driver claims to not accept jdbcUrl, jdbc:mysql://localhost:3306/lisdashboard
-
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
- Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]:
Invocation of init method failed; nested exception is java.lang.RuntimeException: Driver org.h2.Driver claims to not accept jdbcUrl, jdbc:mysql://localhost:3306/lisdashboard
Я не уверен, почему он не принимает URL-адрес jdbc,Есть ли проблема в формате моего конфига?