You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-4Lines changed: 16 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,7 +98,19 @@ public class WidgetController {
98
98
record Widget(intid, Stringname){};
99
99
}
100
100
```
101
-
101
+
## @Singleton
102
+
By default the generated classes will use jakarta.inject.Singleton for wiring. To use Javax Inject, use the compiler arg `-AuseJavax=true`
103
+
```
104
+
<plugin>
105
+
<groupId>org.apache.maven.plugins</groupId>
106
+
<artifactId>maven-compiler-plugin</artifactId>
107
+
<configuration>
108
+
<compilerArgs>
109
+
<arg>-AuseJavax=true</arg>
110
+
</compilerArgs>
111
+
</configuration>
112
+
</plugin>
113
+
```
102
114
## Usage
103
115
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.
0 commit comments