Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jmnarloch/discovery-client-property-spring-cloud-starter
Spring Cloud Discovery configuration properties editor
https://github.com/jmnarloch/discovery-client-property-spring-cloud-starter
Last synced: 4 days ago
JSON representation
Spring Cloud Discovery configuration properties editor
- Host: GitHub
- URL: https://github.com/jmnarloch/discovery-client-property-spring-cloud-starter
- Owner: jmnarloch
- License: apache-2.0
- Created: 2015-11-23T21:54:39.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-28T23:35:13.000Z (almost 9 years ago)
- Last Synced: 2023-03-23T02:33:18.355Z (over 1 year ago)
- Language: Java
- Size: 75.2 KB
- Stars: 0
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Spring Cloud Discovery Configuration Property Editor
> A Spring Cloud Configuration Property for discovering your configuration properties.
[![Build Status](https://travis-ci.org/jmnarloch/discovery-client-property-spring-cloud-starter.svg?branch=master)](https://travis-ci.org/jmnarloch/discovery-client-property-spring-cloud-starter)
[![Coverage Status](https://coveralls.io/repos/jmnarloch/discovery-client-property-spring-cloud-starter/badge.svg?branch=master&service=github)](https://coveralls.io/github/jmnarloch/discovery-client-property-spring-cloud-starter?branch=master)## Features
## Setup
Add the Spring Cloud starter to your project:
```xml
io.jmnarloch
discovery-client-property-spring-cloud-starter
1.0.0```
## Usage
Registers a custom `PropertySource` that allows to resolve a SpEL like expressions for ${discoveryClient.} prefix.
The underlying implementation will delegate to the registered ```DiscoveryClient``` instance allowing to resolve the
properties based on discovery registry.Example:
```yaml
spring:
data:
elasticsearch:
clusterNodes: ${discoveryClient.url(http://elasticsearch/)}
```Currently supported operations:
* service - returns a single service url
* url - expands the url replacing the host name and port with discovered service values, any additional information
passed as the argument like the user login, path and query params will remain intact.Notices that the property will be resolve only once during the application startup.
Currently this extension is most useful with [Consul](http://cloud.spring.io/spring-cloud-consul/) which allows you
to register any arbitrary service.## License
Apache 2.0