From 02b9ac4dfc768b521b206fcdca549387bf740510 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Bu=C3=9F?= Date: Wed, 30 May 2018 09:38:57 +0200 Subject: [PATCH] Make documentation for DiscoveryClient more explicit --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2ccdfc20..ffc3542e 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,17 @@ This is something that you get for free just by adding the following 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: