How to show content of local h2 database(web console)?

后端 未结 3 778
予麋鹿
予麋鹿 2021-02-07 04:55

Recently I joined a new team and here guys use h2 for stub service.

I was wondering whether I can show the content of this database using web interface. At work it is av

3条回答
  •  半阙折子戏
    2021-02-07 05:24

    How about changing jdbc url in configuration to include

    AUTO_SERVER=TRUE 
    

    to start h2 automatically.

    See Auto mixed mode

    Multiple processes can access the same database without having to start the server manually. To do that, append ;AUTO_SERVER=TRUE to the database URL. You can use the same database URL independent of whether the database is already open or not. This feature doesn't work with in-memory databases.

    Use the same URL for all connections to this database. Internally, when using this mode, the first connection to the database is made in embedded mode, and additionally a server is started internally (as a daemon thread). If the database is already open in another process, the server mode is used automatically.

提交回复
热议问题