How to see all tables in my h2 database at localhost:8082?

前端 未结 10 1059
误落风尘
误落风尘 2021-02-01 02:43

I use JDBC and created h2 database called usaDB from sql script. Then I filled all tables with jdbc.

The problem is that after I connect to usaDB at localhost:8082 I can

10条回答
  •  长发绾君心
    2021-02-01 03:26

    In my case the issue was caused by the fact that I didn't set the h2 username, password in java. Unfortunatelly, Spring didn't display any errors to me, so it was not easy to figure out. Adding this lines to dataSource method helped me fix the issue:

    dataSource.setUsername("sa");
    dataSource.setPassword("");
    

    Also, I should have specified the schema when creating tables in schema.sql

提交回复
热议问题