Advertisement
Guest User

Untitled

a guest
Mar 6th, 2017
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://www.springframework.org/schema/beans
  5. http://www.springframework.org/schema/beans/spring-beans.xsd">
  6.  
  7. <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
  8. <property name="locations" value="classpath:application.properties" />
  9. </bean>
  10. <bean id="dtSource" destroy-method="close" class="org.apache.commons.dbcp.BasicDataSource">
  11. <property name="url" value="**test_url**" />
  12. </bean>
  13. </beans>
  14.  
  15. spring.application.name=<appname>
  16. spring.cloud.config.server.git.uri=https://github.com/{username}/test.git
  17. spring.cloud.config.server.git.username=<username>
  18. spring.cloud.config.server.git.password=<password>
  19. profiles.active=${spring.profiles.active}
  20. spring.cloud.config.server.bootstrap=true
  21. spring.config.name=<appname>
  22.  
  23. @RefreshScope
  24. @RestController
  25. class HelloController {
  26.  
  27. @Value("${db.url:Hello default}")
  28. private String message;
  29.  
  30. @RequestMapping("/message")
  31. String getMessage() {
  32. return this.message;
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement