我有一个带有 H2 数据库的 Spring Boot 3 项目,我想在 Docker 容器中运行,但它无法运行。
我正在使用这些命令:
docker build -t spring-hope .
docker run -p 8080:8080 spring-hope
这是配置:
应用程序.yml:
spring:
application:
name: hope
datasource:
driver-class-name: org.h2.Driver
username: sa
password:
jpa:
database-platform: org.hibernate.dialect.H2Dialect
hibernate:
ddl-auto: update
properties:
jakarta.persistence.jdbc.url: jdbc:h2:mem:testdb
hibernate.dialect: org.hibernate.dialect.H2Dialect
h2:
console:
enabled: true
path: /h2-console
server:
error:
include-message: always
include-binding-errors: always
并引发此异常: https://github.com/ocardenasmartinez1984/hope/blob/main/error.txt
这是存储库:https://github.com/ocardenasmartinez1984/hope
大家发生什么事了?