SPRINGBOOT H2 DATABASE | WEB APP| CRUD OPERATIONS | INSERT | EDIT | DELETE | THYMLEAF| OKAYJAVA

Опубликовано: 16 Октябрь 2024
на канале: okay java
15,421
201

SPRINGBOOT H2 DATABASE | WEB APP| CRUD OPERATIONS | INSERT | EDIT | DELETE | THYMLEAF| OKAYJAVA

Application.properties
Persist data in file
Create a folder on c:// with name h2db
H2 will automatically create my_data_file
spring.datasource.url=jdbc:h2:file:C:/h2db/my_data_file
#spring.datasource.url = jdbc:h2:mem:h2db
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
Run data.sql and schema.sql on start
spring.sql.init.mode=always
spring.jpa.show-sql=true
enabled by default.
spring.jpa.open-in-view=false
Enable H2 Console - http://localhost:8080/h2-console
spring.h2.console.enabled=true
Console path - http://localhost:8080/h2
spring.h2.console.path=/h2

DOWNLOAD PROJECT
https://drive.google.com/open?id=1GBj...