Guest User

Untitled

a guest
Mar 22nd, 2018
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.99 KB | None | 0 0
  1. spring
  2. datasource
  3. url:jdbc:postgresql://localhost/vcu
  4. username=postgres
  5. password=postgresql
  6.  
  7. spring
  8. datasource
  9. url:jdbc:postgresql://localhost/rocker
  10. username=postgres
  11. password=postgresql
  12.  
  13. server.port=8888
  14. spring.profiles.active=native
  15. spring.cloud.config.server.native.search-locations=classpath
  16. spring.config.name=configserver
  17.  
  18. <dependencies>
  19. <dependency>
  20. <groupId>org.springframework.boot</groupId>
  21. <artifactId>spring-boot-starter-actuator</artifactId>
  22. </dependency>
  23. <dependency>
  24. <groupId>org.springframework.boot</groupId>
  25. <artifactId>spring-boot-starter-web</artifactId>
  26. </dependency>
  27. <dependency>
  28. <groupId>org.springframework.cloud</groupId>
  29. <artifactId>spring-cloud-config-server</artifactId>
  30. </dependency>
  31.  
  32. <dependency>
  33. <groupId>org.springframework.boot</groupId>
  34. <artifactId>spring-boot-starter-tomcat</artifactId>
  35. <scope>provided</scope>
  36. </dependency>
  37. <dependency>
  38. <groupId>org.springframework.boot</groupId>
  39. <artifactId>spring-boot-starter-test</artifactId>
  40. <scope>test</scope>
  41. </dependency>
  42. </dependencies>
  43.  
  44. @SpringBootApplication
  45. @Configuration
  46. @EnableAutoConfiguration
  47. @RestController
  48. public class SpaceStudyConfigClientTestApplication {
  49.  
  50. @Value("${spring.datasource.url}")
  51. public String dbName;
  52.  
  53. @GetMapping("/loadConfigDetails")
  54. public String loadDatabaseDetails() {
  55. return dbName;
  56. }
  57.  
  58. public static void main(String[] args) {
  59. SpringApplication.run(SpaceStudyConfigClientTestApplication.class,
  60. args);
  61. }
  62. }
  63.  
  64. server.port=8080
  65. spring.profiles.active=default
  66. spring.cloud.config.uri=localhost:8888
  67.  
  68. FROM openjdk:8
  69. ADD target/SpaceStudyConfigClientTest-0.0.1-SNAPSHOT.war
  70. SpaceStudyConfigClientTest.war
  71. EXPOSE 8080
  72. ENTRYPOINT ["java", "-jar", "-Dspring.profiles.active=rocker" ,
  73. "SpaceStudyConfigClientTest.war"]
  74.  
  75. Could not resolve placeholder 'spring.datasource.url' in value
  76. ${spring.datasource.url}""
Add Comment
Please, Sign In to add comment