spring-guides / gs-relational-data-access

Accessing Relational Data using JDBC with Spring :: Learn how to access relational data with Spring.

Home Page:https://spring.io/guides/gs/relational-data-access/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Where would H2 database store data?

lplpkkk opened this issue · comments

commented

hello, I am confused that would the H2 database disappear after this app finish? Could I store these data in my own computer?

thanks for help!!

H2 is an in-memory database. I think you can ask it to dump data to disk if you initialize it with the right URL. Why not look at the documentation here: http://www.h2database.com/html/main.html?

commented

thanks! Is "Embedded" means "In memory"?

still a little confused

In-memory doesn't equal embedded. In-memory runs inside the memory of the app. Embedded means that the app controls it. For example, embedded ActiveMQ or embedded Tomcat don't necessarily use the same memory space, but can be started and stopped by the app and not require additional setup outside the app.

commented

got it! thanks!