Skip to content

Commit

Permalink
Merge pull request #558 from eCubeGmbH/fix-best-practices
Browse files Browse the repository at this point in the history
Remove the incorrect lines
  • Loading branch information
jenschude authored Jan 29, 2024
2 parents 154b530 + 842a90a commit 3c6e33e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ The ApiRootBuilder can be used to configure it.
ApiRootBuilder.of().withErrorMiddleware();
```

barbara79 marked this conversation as resolved.
If the `defaultClient` builder method is used it will be configured. The builder also ensures that the ErrorMiddleware is always the last middleware in the call stack. The following examples shows custom configuration of the equivalent of the above method:

```java
Expand Down Expand Up @@ -168,7 +167,7 @@ ApiRootBuilder.of().addNotFoundExceptionMiddleware(request -> request.getUri().g

### How to reuse the Client
The client can be created once, it can be used by creating the **ApiRoot** object instance and reusing the object instance throughout the whole application.
barbara79 marked this conversation as resolved.

```java
ProjectApiRoot apiRoot = ApiRootBuilder.of()
.defaultClient(ClientCredentials.of()
Expand Down

0 comments on commit 3c6e33e

Please sign in to comment.