Open skymans opened 7 years ago
You could access it via http://localhost:8080/master/gateway/prod.properties
.
Following are the alternate formats.
Refer to the Documentation for more details.
Does this solve your query?
Hi venilnoronha,
How i can write the client for this. I need to refreash some key in my service using this. I used @RefreshScope for the same but it didn't work.
PFB the code
@RefreshScope @RestController class MessageRestController { @Value("${message:Hello default}") private String message;
@RequestMapping("/message")
String getMessage() {
return this.message;
}
}
message is not getting refresh automatically in it. How it can be refresh automatically as it gets updated in mongodb
You need to hit the http://HOST:PORT/refresh
endpoint to load the updated configuration. Check out the documentation for more details.
So You are saying that i have to refresh it every time i change anything in mongodb. But in git implementation it is getting auto refresh after some time.
Currently, the MongoDB implementation doesn't support the monitoring feature. The Git based implementation relies on a watcher defined in spring-cloud-config-monitor
, and therefore, properties are updated as soon as a commit notification is received.
As a workaround, you could use some logic similar to this comment to automatically update properties.
Thanks for bringing this up. I'll do some investigation and see what could be done.
http://localhost:8080/gateway/prod
在浏览器这么访问数据,访问不到,怎么回事呢?