how to connect my spring boot application with any database like h2, my sql, mongo db, post gres, etc
That sounds like a spring boot question. It would depend on the database and you could connect it to a running database in the dev.nix (like how you can run Postges local