Skip to content

Commit

Permalink
Add how to section. (#7)
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Klauke <[email protected]>
  • Loading branch information
felixklauke authored Jan 26, 2018
1 parent 6f0ea59 commit 59eee42
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,24 @@ In this case we will use logback as our logging framework.
</dependency>
```

# Example
# Example / How To

First you will have to install our module in your injector. You can put the module
in the injector creation or install our module in your main module.

```java
Injector injector = Guice.createInjector(new MyCoolModule(), new LogbackModule());
```

```java
@Override
protected void configure() {
install(new LogbackModule);
}
```

As soon as the module is installed you can use on any field:

```java
@InjectLogback private Logger logger;
```

0 comments on commit 59eee42

Please sign in to comment.