InterviewSolution
Saved Bookmarks
| 1. |
How To Configure Datasource Using Spring Boot? |
|
Answer» Use EITHER SPRING-boot-starter-jdbc or spring-boot-starterdata-jpa and include a JDBC driver on classpath Declare properties: spring.datasource.url=jdbc:mysql://localhost/test spring.datasource.username=dbuser spring.datasource.password=dbpass spring.datasource.driver-class-name=com.mysql.jdbc.Driver
Use either spring-boot-starter-jdbc or spring-boot-starterdata-jpa and include a JDBC driver on classpath Declare properties: spring.datasource.url=jdbc:mysql://localhost/test spring.datasource.username=dbuser spring.datasource.password=dbpass spring.datasource.driver-class-name=com.mysql.jdbc.Driver |
|