Advertisement
Guest User

Untitled

a guest
Aug 29th, 2017
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.92 KB | None | 0 0
  1. 2017-08-28T14:15:44.952-07:00 [APP/PROC/WEB/0] [ERR] WARNING: No suitable service info creator found for service employee-maria-rds. Did you forget to add a ServiceInfoCreator?
  2. 2017-08-28T14:15:44.952-07:00 [APP/PROC/WEB/0] [ERR] Aug 28, 2017 9:15:44 PM org.springframework.cloud.AbstractCloudConnector getServiceInfo
  3.  
  4. public class App {
  5. public static void main (String args[]) throws InterruptedException, SQLException {
  6. CloudFactory cloudFactory = new CloudFactory();
  7. Cloud cloud = cloudFactory.getCloud();
  8. // ServiceInfo has all the information necessary to connect to the underlying service
  9. List<ServiceInfo> serviceInfos = cloud.getServiceInfos();
  10. for (ServiceInfo serviceInfo : serviceInfos) {
  11. if (serviceInfo instanceof RelationalServiceInfo) {
  12. System.out.println(((RelationalServiceInfo) serviceInfo).getJdbcUrl());
  13. }
  14. }}}
  15.  
  16. {
  17. "staging_env_json": {},
  18. "running_env_json": {},
  19. "system_env_json": {
  20. "VCAP_SERVICES": {
  21. "mariaDB": [
  22. {
  23. "credentials": {
  24. "uri": "jdbc:mysql://db1.us-east-1.rds.amazonaws.com:3306/employee",
  25. "username": "xxxx",
  26. "password": "xxxx",
  27. "host": "db1.us-east-1.rds.amazonaws.com",
  28. "port": "3306",
  29. "database": "employee"
  30. },
  31. "syslog_drain_url": null,
  32. "volume_mounts": [],
  33. "label": "mariaDB",
  34. "provider": null,
  35. "plan": "Medium-Plan",
  36. "name": "employee-maria-rds",
  37. "tags": []
  38. },
  39. {
  40. "credentials": {
  41. "uri": "jdbc:mysql://db2.us-east-1.rds.amazonaws.com:3306/hcm",
  42. "username": "xxxx",
  43. "password": "xxxx",
  44. "host": "db2.us-east-1.rds.amazonaws.com",
  45. "port": "3306",
  46. "database": "hcm"
  47. },
  48. "syslog_drain_url": null,
  49. "volume_mounts": [],
  50. "label": "mariaDB",
  51. "provider": null,
  52. "plan": "Small-Plan",
  53. "name": "hcm-maria-db",
  54. "tags": []
  55. }
  56. ]
  57. }
  58. },
  59. "application_env_json": {
  60. "VCAP_APPLICATION": {
  61. "cf_api": "https://apps.abc.com",
  62. "limits": {
  63. "fds": 16384,
  64. "mem": 256,
  65. "disk": 256
  66. },
  67. "application_name": "java-main-application",
  68. "application_uris": [],
  69. "name": "java-main-application",
  70. "space_name": "development",
  71. "space_id": "a8844960-4d08-4d80-b589-4ea1473ed0bb",
  72. "uris": [],
  73. "users": null,
  74. "application_id": "004sdf3ef-3d7a-44d6-81d5-a04bwetf62e07",
  75. "version": "c31234g56-4f42-4454-b30e-540sdghh684d6",
  76. "application_version": "d2ggd656-4f42-4434-b30e-54g2348684d6"
  77. }
  78. }
  79. }
  80.  
  81. <dependency>
  82. <groupId>org.springframework.cloud</groupId>
  83. <artifactId>spring-cloud-cloudfoundry-connector</artifactId>
  84. <version>1.2.4.RELEASE</version>
  85. </dependency>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement