Skip to content

Commit

Permalink
Make documentation for DiscoveryClient more explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
t-buss authored and iocanel committed Jun 11, 2018
1 parent a9a406f commit 0c69ff2
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down

0 comments on commit 0c69ff2

Please sign in to comment.