0

since I hope that the data will be stored in local disk, I set spring.datasource.url = jdbc:h2:./db/h2db;DB_CLOSE_ON_EXIT=FALSE. It works. The data will not disappear.

However, when I try to log in the h2 console by localhost:8080/h2-console, the login page is loaded normally but I can't login. I try to use jdbc:h2:file:C:/Users/syx/IdeaProjects/project-name/db/h2db to replace the default value in the 'JDBC URL' field but still fail.

I'm sure that I never set any password.

could you tell me how to log in the h2 console in the case? Thanks a lot.

  • just provide username and password as described https://stackoverflow.com/a/24727653/175554 then you can login to console. – ozkanpakdil Sep 12 '21 at 17:12

0 Answers0