'Change H2 Database to SQL database in spring boot
I am learning Spring boot by myself. Now I am using H2 database in my spring boot application.
How do I change H2 database to SQL database?
Is there any other application need to install for using SQL database?
Solution 1:[1]
No, you just need to add corresponding dependencies with the DB and then update the application.properties file with the new configuration of your desired DB.
Look at this to work with MySQL: https://mkyong.com/spring-boot/spring-boot-spring-data-jpa-mysql-example/
Or you may want to use different profiles with different DBs (eg: H2 & MySQL) See this: https://www.baeldung.com/spring-profiles
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Hung Nguyen Duy |
