Я хочу создать таблицу через H2 в Springboot, но когда я запускаю, у меня есть следующая ошибка; < /p>
org.hibernate.dialect.dialect: hhh000400: используя диалект:
org.hibernate.dialect.h2dialect
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "create table bank_account (id bigint not null, balance
double not null, full name varchar(128) not null, primary key (id))"
via JDBC Statement
...
data.sql:
Insert into Bank_Account(ID, Full_Name, Balance) values (1, 'Ibrahim', 2500);
Insert into Bank_Account(ID, Full_Name, Balance) values (2, 'Ates', 4210);
< /code>
pom.xml;
com.h2database
h2
runtime
< /code>
application.properties;
# H2
spring.h2.console.enabled=true
spring.h2.console.path=/h2
# Datasource
spring.datasource.url=jdbc:h2:mem:testdb
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
spring.datasource.continue-on-error=true
spring.jpa.hibernate.ddl-auto=create
< /code>
Что я пропустил? Я изменил сущность с именем «полное имя» на «full_name», затем была решена проблема.
Подробнее здесь: https://stackoverflow.com/questions/546 ... -ddl-error