What is the proper way to close H2?

前端 未结 5 1943
我在风中等你
我在风中等你 2020-12-15 04:25

This is related to this post.
I think I am having problem with H2 meaning that it does not close properly.
I suspect this since I see myDB.lock.db

5条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-15 04:59

    You can execute the statement SHUTDOWN and then close the connection.

    The SHUTDOWN command will make H2 free all resources related to the connection immediately. That will, for example, allow you to get rid of an embedded H2 database when you redeploy a web application.

提交回复
热议问题