Ok, Im developing simple app, which has Spring Ebedded H2 database for development. database.xml bean conf looks like this:
if your application is not spring boot than you need to add below servlet configuration in web.xml file
!-- H2 Database Console for managing the app's database -->
H2Console
org.h2.server.web.WebServlet
-webAllowOthers
true
2
H2Console
/admin/h2/*
please see more details https://github.com/spring-projects/greenhouse/blob/master/src/main/webapp/WEB-INF/web.xml
and if your application is spring boot based than you have to follow https://springframework.guru/using-the-h2-database-console-in-spring-boot-with-spring-security/