I added the following property into my application.properties
to separate sensitive account infos from the main application.
#/src/main/resources/application.properties
spring.config.additional-location=/etc/java/myapp/
spring.datasource.url=jdbc:mysql://localhost/mytable
Additional:
#/etc/java/myapp/application.properties:
spring.datasource.username=theuser
spring.datasource.password=thepw
Result: the properties are not found!
java.sql.SQLException: Access denied for user ''@'localhost' (using password: NO)
What am I doing wrong here?
Sidenote: if I add default values, the problem remains. The properties are not overridden!
spring.datasource.username=replaceme spring.datasource.password=replaceme
Result:
java.sql.SQLException: Access denied for user 'replaceme'@'localhost' (using password: YES)