I have some questions regarding the datasource in my application.properties
#Data Source properties
spring.datasource.url=jdbc:mysql://${MYSQL_HOST:localhost}:3306/example
spring.datasource.username=root
spring.datasource.password=root
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
What exactly is the datasource.driver-class-name indicating?
This name refer to the classname of the JDBC driver for communicating with your database. This class will be loaded at launch time (it must be available in the classpath).
The url is the location of your database. Here you are saying my database is located at http://localhost:3306/example where example is the database name.
The DriverClassName is the name of the JDBC driver that you use to talk to your database. in case one of the Spring data libraries like JDBC or JPA is used you can omit that property.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With