File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed
src/main/java/org/example Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 1919 <jex .version>1.3</jex .version>
2020 <swagger .version>2.0.8</swagger .version>
2121 <jackson .version>2.12.3</jackson .version>
22- <avaje-http-version >1.4-SNAPSHOT</avaje-http-version >
22+ <avaje-inject .version>6.0.RC3</avaje-inject .version>
23+ <avaje-http .version>1.4-SNAPSHOT</avaje-http .version>
2324 </properties >
2425
2526 <dependencies >
4546 <dependency >
4647 <groupId >io.avaje</groupId >
4748 <artifactId >avaje-inject</artifactId >
48- <version >4.1 </version >
49+ <version >${avaje-inject.version} </version >
4950 </dependency >
5051
5152 <dependency >
7172 <dependency >
7273 <groupId >io.avaje</groupId >
7374 <artifactId >avaje-inject-generator</artifactId >
74- <version >4.1 </version >
75+ <version >${avaje-inject.version} </version >
7576 <scope >provided</scope >
7677 </dependency >
7778
7879 <dependency >
7980 <groupId >io.avaje</groupId >
8081 <artifactId >avaje-http-jex-generator</artifactId >
81- <version >${avaje-http- version} </version >
82+ <version >${avaje-http. version} </version >
8283 <scope >provided</scope >
8384 </dependency >
8485
Original file line number Diff line number Diff line change 11package org .example ;
22
3- import io .avaje .inject .BeanContext ;
4- import io .avaje .inject .SystemContext ;
3+ import io .avaje .inject .ApplicationScope ;
4+ import io .avaje .inject .BeanScope ;
55import io .avaje .jex .Jex ;
66import io .avaje .jex .Routing ;
77
@@ -12,12 +12,12 @@ public static void main(String[] args) {
1212 }
1313
1414 public static Jex .Server start (int port ) {
15- return start (port , SystemContext . context ());
15+ return start (port , ApplicationScope . scope ());
1616 }
1717
18- public static Jex .Server start (int port , BeanContext context ) {
18+ public static Jex .Server start (int port , BeanScope context ) {
1919 final Jex jex = Jex .create ();
20- jex .routing ().addAll (context .getBeans (Routing .Service .class ));
20+ jex .routing ().addAll (context .list (Routing .Service .class ));
2121 return jex .port (port ).start ();
2222 }
2323}
You can’t perform that action at this time.
0 commit comments