File tree Expand file tree Collapse file tree 9 files changed +22
-20
lines changed
src/main/java/org/example/server
src/main/java/org/example
src/main/java/org/example/myapp
src/main/java/org/example Expand file tree Collapse file tree 9 files changed +22
-20
lines changed Original file line number Diff line number Diff line change 1515 <properties >
1616 <maven .deploy.skip>true</maven .deploy.skip>
1717 <jex .version>1.6</jex .version>
18- <avaje-inject .version>6.1 </avaje-inject .version>
18+ <avaje-inject .version>6.12 </avaje-inject .version>
1919 </properties >
2020
2121 <dependencies >
Original file line number Diff line number Diff line change 11package org .example .server ;
22
3- import io .avaje .inject .ApplicationScope ;
43import io .avaje .inject .BeanScope ;
54import io .avaje .jex .Jex ;
65import io .avaje .jex .Routing ;
@@ -14,7 +13,8 @@ public static void main(String[] args) {
1413 }
1514
1615 public static Jex .Server start (int port ) {
17- return start (port , ApplicationScope .scope ());
16+ BeanScope beanScope = BeanScope .newBuilder ().build ();
17+ return start (port , beanScope );
1818 }
1919
2020 public static Jex .Server start (int port , BeanScope context ) {
Original file line number Diff line number Diff line change 4040 <dependency >
4141 <groupId >io.avaje</groupId >
4242 <artifactId >avaje-inject</artifactId >
43- <version >6.1 </version >
43+ <version >6.12 </version >
4444 </dependency >
4545 <dependency >
4646 <groupId >io.avaje</groupId >
4747 <artifactId >avaje-inject-generator</artifactId >
48- <version >6.1 </version >
48+ <version >6.12 </version >
4949 <scope >provided</scope >
5050 </dependency >
5151
Original file line number Diff line number Diff line change 11package org .example ;
22
3- import io .avaje .inject .ApplicationScope ;
3+ import io .avaje .inject .BeanScope ;
44import io .helidon .health .HealthSupport ;
55import io .helidon .media .jackson .JacksonSupport ;
66import io .helidon .metrics .MetricsSupport ;
@@ -58,7 +58,8 @@ private static Routing createRouting() {
5858 .register (MetricsSupport .create ())
5959 .register ("/greet" , new GreetService ());
6060
61- ApplicationScope .list (Service .class ).forEach (builder ::register );
61+ BeanScope beanScope = BeanScope .newBuilder ().build ();
62+ beanScope .list (Service .class ).forEach (builder ::register );
6263
6364 return builder .build ();
6465 }
Original file line number Diff line number Diff line change 5151 <dependency >
5252 <groupId >io.avaje</groupId >
5353 <artifactId >avaje-inject</artifactId >
54- <version >6.1 </version >
54+ <version >6.12 </version >
5555 </dependency >
5656
5757 <dependency >
6363 <dependency >
6464 <groupId >io.avaje</groupId >
6565 <artifactId >avaje-http-hibernate-validator</artifactId >
66- <version >2.5 </version >
66+ <version >2.6 </version >
6767 </dependency >
6868
6969 <dependency >
7777 <dependency >
7878 <groupId >io.avaje</groupId >
7979 <artifactId >avaje-inject-generator</artifactId >
80- <version >6.1 </version >
80+ <version >6.12 </version >
8181 <scope >provided</scope >
8282 </dependency >
8383
Original file line number Diff line number Diff line change 11package org .example .myapp ;
22
33import io .avaje .http .api .*;
4- import io .avaje .inject .ApplicationScope ;
4+ import io .avaje .inject .BeanScope ;
55import io .avaje .inject .InjectModule ;
66import io .javalin .Javalin ;
77import io .javalin .http .staticfiles .Location ;
1414import java .util .List ;
1515import java .util .Map ;
1616
17- @ InjectModule (name = "app" , dependsOn = "validator" , requires = Validator .class )
17+ @ InjectModule (name = "app" , requires = Validator .class )
1818@ OpenAPIDefinition (info = @ Info (title = "Example service" , description = "Example Javalin controllers with Java and Maven" ))
1919public class Main {
2020
@@ -68,7 +68,8 @@ public static Javalin start(int port) {
6868 });
6969
7070 // All WebRoutes / Controllers ... from DI Context
71- List <WebRoutes > webRoutes = ApplicationScope .list (WebRoutes .class );
71+ BeanScope beanScope = BeanScope .newBuilder ().build ();
72+ List <WebRoutes > webRoutes = beanScope .list (WebRoutes .class );
7273 app .routes (() -> webRoutes .forEach (WebRoutes ::registerRoutes ));
7374
7475 app .start (port );
Original file line number Diff line number Diff line change 1818 <jex .version>2.0</jex .version>
1919 <swagger .version>2.0.8</swagger .version>
2020 <jackson .version>2.12.3</jackson .version>
21- <avaje-inject .version>6.1 </avaje-inject .version>
21+ <avaje-inject .version>6.12 </avaje-inject .version>
2222 <avaje-http .version>1.13-SNAPSHOT</avaje-http .version>
2323 </properties >
2424
6363 <dependency >
6464 <groupId >io.avaje</groupId >
6565 <artifactId >avaje-http-hibernate-validator</artifactId >
66- <version >2.5 </version >
66+ <version >2.6 </version >
6767 </dependency >
6868
6969 <dependency >
Original file line number Diff line number Diff line change 22
33import io .avaje .http .api .ValidationException ;
44import io .avaje .http .api .Validator ;
5- import io .avaje .inject .ApplicationScope ;
65import io .avaje .inject .BeanScope ;
76import io .avaje .inject .InjectModule ;
87import io .avaje .jex .Jex ;
@@ -19,7 +18,8 @@ public static void main(String[] args) {
1918 }
2019
2120 public static Jex .Server start (int port ) {
22- return start (port , ApplicationScope .scope ());
21+ BeanScope beanScope = BeanScope .newBuilder ().build ();
22+ return start (port , beanScope );
2323 }
2424
2525 public static Jex .Server start (int port , BeanScope context ) {
Original file line number Diff line number Diff line change 4343 <dependency >
4444 <groupId >io.avaje</groupId >
4545 <artifactId >avaje-inject</artifactId >
46- <version >6.1 </version >
46+ <version >6.12 </version >
4747 </dependency >
4848
4949 <dependency >
5555 <dependency >
5656 <groupId >io.avaje</groupId >
5757 <artifactId >avaje-http-hibernate-validator</artifactId >
58- <version >2.5 </version >
58+ <version >2.6 </version >
5959 </dependency >
6060
6161 <dependency >
6969 <dependency >
7070 <groupId >io.avaje</groupId >
7171 <artifactId >avaje-inject-generator</artifactId >
72- <version >6.1 </version >
72+ <version >6.12 </version >
7373 <scope >provided</scope >
7474 </dependency >
7575
You can’t perform that action at this time.
0 commit comments