Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd">
- <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
- <property name="locations" value="classpath:application.properties" />
- </bean>
- <bean id="dtSource" destroy-method="close" class="org.apache.commons.dbcp.BasicDataSource">
- <property name="url" value="**test_url**" />
- </bean>
- </beans>
- spring.application.name=<appname>
- spring.cloud.config.server.git.uri=https://github.com/{username}/test.git
- spring.cloud.config.server.git.username=<username>
- spring.cloud.config.server.git.password=<password>
- profiles.active=${spring.profiles.active}
- spring.cloud.config.server.bootstrap=true
- spring.config.name=<appname>
- @RefreshScope
- @RestController
- class HelloController {
- @Value("${db.url:Hello default}")
- private String message;
- @RequestMapping("/message")
- String getMessage() {
- return this.message;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement