Make documentation for DiscoveryClient more explicit

This commit is contained in:
Thomas Buß
2018-05-30 09:38:57 +02:00
committed by Ioannis Canellos
parent ca63bb2caf
commit 02b9ac4dfc

View File

@@ -42,7 +42,17 @@ This is something that you get for free just by adding the following dependency
</dependency>
```
To enable loading of the `DiscoveryClient`, add `@EnableDiscoveryClient` to the according configuration or application class.
To enable loading of the `DiscoveryClient`, add `@EnableDiscoveryClient` to the according configuration or application class like this:
```java
@SpringBootApplication
@EnableDiscoveryClient
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
```
Then you can inject the client in your code simply by: