Skip to content

Commit 3776763

Browse files
committed
Bump tests to use avaje-inject 6.12 (and bumped hibernate validator)
1 parent ffc4ef0 commit 3776763

File tree

9 files changed

+22
-20
lines changed

9 files changed

+22
-20
lines changed

tests/test-client/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
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>

tests/test-client/src/main/java/org/example/server/Main.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package org.example.server;
22

3-
import io.avaje.inject.ApplicationScope;
43
import io.avaje.inject.BeanScope;
54
import io.avaje.jex.Jex;
65
import 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) {

tests/test-helidon/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@
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

tests/test-helidon/src/main/java/org/example/Main.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.example;
22

3-
import io.avaje.inject.ApplicationScope;
3+
import io.avaje.inject.BeanScope;
44
import io.helidon.health.HealthSupport;
55
import io.helidon.media.jackson.JacksonSupport;
66
import 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
}

tests/test-javalin/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
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>
@@ -63,7 +63,7 @@
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>
@@ -77,7 +77,7 @@
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

tests/test-javalin/src/main/java/org/example/myapp/Main.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package org.example.myapp;
22

33
import io.avaje.http.api.*;
4-
import io.avaje.inject.ApplicationScope;
4+
import io.avaje.inject.BeanScope;
55
import io.avaje.inject.InjectModule;
66
import io.javalin.Javalin;
77
import io.javalin.http.staticfiles.Location;
@@ -14,7 +14,7 @@
1414
import java.util.List;
1515
import 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"))
1919
public 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);

tests/test-jex/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
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

@@ -63,7 +63,7 @@
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>

tests/test-jex/src/main/java/org/example/Main.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import io.avaje.http.api.ValidationException;
44
import io.avaje.http.api.Validator;
5-
import io.avaje.inject.ApplicationScope;
65
import io.avaje.inject.BeanScope;
76
import io.avaje.inject.InjectModule;
87
import 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) {

tests/test-spark/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
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>
@@ -55,7 +55,7 @@
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>
@@ -69,7 +69,7 @@
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

0 commit comments

Comments
 (0)