Check out example codes for "spring application properties mysql jpa". It will help you in understanding the concepts better.

Code Example 1

//set username and password as environment variables under application configuration so that the real ones won't be pushed to github, only their aliases: USERNAME and PASSWORD in this case. 
spring.datasource.username=${USERNAME} // instead of ${USERNAME} you may use a generic one as well, like 'root' but then it will be pushed to github with the app so anyone can see you username and password.
spring.jpa.hibernate.ddl-auto=create-drop //running after the first time (when the tables are created in the database) or later when you want the data remain for later tests you have to change the key word 'create-drop' to 'update' so that the data remains in place. Oops! the database itself without the tables needs to be created manually first.

Code Example 2


Learn ReactJs, React Native from