Skip to content

Commit 62d8d14

Browse files
authored
Update README.md
1 parent 1d85a65 commit 62d8d14

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ public class WidgetController {
101101
## DI Usage
102102
The annotation processor will generate controller adapters that can register routes to Javalin/Helidon. The natural way to use the generated adapters is to get a DI library to find and wire them. This is what the below examples do and they use [Avaje-Inject](https://avaje.io/inject/) to do this. The AP will automatically detect the presence of avaje-inject and generate the class to use avaje-inject's `@Component` as the DI annotation.
103103

104-
There isn't a hard requirement to use Avaje for dependency injection. In the absence of avaje-inject the generated class will default to use `@jakarta.inject.Singleton`. Any DI library that can find and wire the generated @Singleton beans can be used. You can even use Dagger2 or Guice to wire the controllers if you so desire.
104+
There isn't a hard requirement to use Avaje for dependency injection. In the absence of avaje-inject the generated class will use `@jakarta.inject.Singleton` or `@javax.inject.Singleton` depending on what's on the classpath. Any DI library that can find and wire the generated @Singleton beans can be used. You can even use Dagger2 or Guice to wire the controllers if you so desire.
105105

106-
To have the AP generate using `@javax.inject.Singleton`, use the compiler arg `-AuseJavax=true`
106+
To force the AP to generate with `@javax.inject.Singleton`(in the case where you have both jakarta and javax on the classpath), use the compiler arg `-AuseJavax=true`
107107
```
108108
<plugin>
109109
<groupId>org.apache.maven.plugins</groupId>

0 commit comments

Comments
 (0)