SPRINGBOOT H2 DATABASE | DATA PERSISTENCE | SAVE TABLE RECORDS H2 | SPRINGBOOT H2 DB | OKAYJAVA

Published: 26 April 2020
on channel: okay java
7k
70

SPRINGBOOT H2 DATABASE | DATA PERSISTENCE | SAVE TABLE RECORDS H2 | SPRINGBOOT H2 DB | OKAYJAVA
New Sample project

Application.proerties file
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 -
spring.h2.console.enabled=true
# Console path -
spring.h2.console.path=/h2

# Whether to enable trace output.
spring.h2.console.settings.trace=false
# Whether to enable remote access.
spring.h2.console.settings.web-allow-others=false


Watch video SPRINGBOOT H2 DATABASE | DATA PERSISTENCE | SAVE TABLE RECORDS H2 | SPRINGBOOT H2 DB | OKAYJAVA online without registration, duration 09 minute 25 second in high hd quality. This video was added by user okay java 26 April 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 7 thousand once and liked it 70 people.