Reputation: 21
I know that it is possible to pass connection parameters as an argument, but I have a requirement - the password from the database must be accepted in hidden mode. For example how System.console().readPassword()
Upvotes: 2
Views: 795
Reputation: 61
If you are using the latest versions of spring-boot 2.X, the below command line will override your datasource password:
java -jar -Dspring.datasource.password=pass your_jar_file.jar
Upvotes: 3