Advertisement
Guest User

Untitled

a guest
Oct 7th, 2016
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. logging.file=myfilename.log
  2. logging.path=/var/log/mydir
  3.  
  4. # db1
  5. spring.db1.url=jdbc:mysql://[my_host_ip]/db1
  6. spring.db1.username=my_host_username
  7. spring.db1.password=my_host_password
  8. spring.db1.driver-class-name=com.mysql.jdbc.Driver
  9.  
  10. # db2
  11. spring.db2.url=jdbc:mysql://[my_host_ip]/db2
  12. spring.db2.username=my_host_username
  13. spring.db2.password=my_host_password
  14. spring.db2.driver-class-name=com.mysql.jdbc.Driver
  15.  
  16. i) application-production.properties
  17.  
  18. ii) application-dev.properties
  19.  
  20. iii) application-test.properties
  21.  
  22. iv) application-staging.properties
  23.  
  24. v) application-local.properties
  25.  
  26. bootRun {
  27. systemProperties = System.properties
  28. }
  29.  
  30. ./gradlew clean bootRun -Dspring.profiles.active=test
  31.  
  32. ./gradlew clean build -Dspring.profiles.active=test
  33.  
  34. java -jar myapp.jar -Dspring.profiles.active=dev
  35.  
  36. java -jar myapp.jar -Dspring.profiles.active=staging
  37.  
  38. Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: The url cannot be null
  39.  
  40. Caused by: java.sql.SQLException: The url cannot be null
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement