Make documentation for DiscoveryClient more explicit
This commit is contained in:
committed by
Ioannis Canellos
parent
ca63bb2caf
commit
02b9ac4dfc
12
README.md
12
README.md
@@ -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:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user