如何在 Spring Boot 中如何啓用 H2 的控制檯?
你需要在你的 application.properties 文件中啓用配置:
spring.h2.console.enabled=true
spring.h2.console.path=/h2-console
具體的配置你可以參考頁面 Spring Boot 使用 H2 數據庫的控制檯(Console) 中的內容。
運行後的界面如下:
使用的端口,是你 Spring Boot 運行使用的端口。
登錄進去數據庫後查看的界面:
你也可以訪問 GitHub 上面的內容下載代碼:
有關本內容的鏈接:
https://www.cwiki.us/display/SpringBootZH/questions/57938823