application.properties stores Spring Boot settings as key-value pairs. For a database connection, set its location and credentials with spring.datasource properties; Spring Boot uses them to create a DataSource bean. section 12.3.1
Listing 12.12 The connection properties
spring.datasource.url=jdbc:mysql://localhost/spring_start_here? useLegacyDatetimeCode=false&serverTimezone=UTC #A spring.datasource.username=<dbms username> #B spring.datasource.password=<dbms password> #B spring.sql.init.mode=always #C
A MySQL example sets the connection URL and credentials, then enables schema.sql initialization with spring.sql.init.mode=always. Avoid storing real production passwords in the file; use a secret vault. section 12.3.1
