Skip to content

Commit aff9935

Browse files
committed
Merge branch 'feature/bump-2.x'
2 parents d179239 + 689c310 commit aff9935

File tree

10 files changed

+30
-33
lines changed

10 files changed

+30
-33
lines changed

http-generator-core/src/main/java/io/avaje/http/generator/core/Constants.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
package io.avaje.http.generator.core;
22

3-
class Constants {
3+
public class Constants {
4+
5+
/**
6+
* The suffix used by avaje-inject for generated factories.
7+
* A factory is generated automatically for request scoped controllers.
8+
*/
9+
public static final String FACTORY_SUFFIX = "$Factory";
410

511
static final String OPENAPIDEFINITION = "io.swagger.v3.oas.annotations.OpenAPIDefinition";
612

http-generator-helidon/src/main/java/io/avaje/http/generator/helidon/ControllerWriter.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
package io.avaje.http.generator.helidon;
22

3-
import io.avaje.http.generator.core.BaseControllerWriter;
4-
import io.avaje.http.generator.core.ControllerReader;
5-
import io.avaje.http.generator.core.MethodReader;
6-
import io.avaje.http.generator.core.ProcessingContext;
3+
import io.avaje.http.generator.core.*;
74

85
import java.io.IOException;
96
import java.util.List;
@@ -70,7 +67,7 @@ private void writeClassStart() {
7067
String controllerType = shortName;
7168
if (isRequestScoped()) {
7269
controllerName = "factory";
73-
controllerType += "$factory";
70+
controllerType += Constants.FACTORY_SUFFIX;
7471
}
7572
writer.append(" private final %s %s;", controllerType, controllerName).eol();
7673
if (reader.isIncludeValidator()) {

http-generator-javalin/src/main/java/io/avaje/http/generator/javalin/ControllerWriter.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
package io.avaje.http.generator.javalin;
22

3-
import io.avaje.http.generator.core.BaseControllerWriter;
4-
import io.avaje.http.generator.core.ControllerReader;
5-
import io.avaje.http.generator.core.MethodReader;
6-
import io.avaje.http.generator.core.ProcessingContext;
3+
import io.avaje.http.generator.core.*;
74

85
import java.io.IOException;
96

@@ -55,7 +52,7 @@ private void writeClassStart() {
5552
String controllerType = shortName;
5653
if (isRequestScoped()) {
5754
controllerName = "factory";
58-
controllerType += "$factory";
55+
controllerType += Constants.FACTORY_SUFFIX;
5956
}
6057
writer.append(" private final %s %s;", controllerType, controllerName).eol();
6158

http-generator-jex/src/main/java/io/avaje/http/generator/jex/ControllerWriter.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
package io.avaje.http.generator.jex;
22

3-
import io.avaje.http.generator.core.BaseControllerWriter;
4-
import io.avaje.http.generator.core.ControllerReader;
5-
import io.avaje.http.generator.core.MethodReader;
6-
import io.avaje.http.generator.core.ProcessingContext;
3+
import io.avaje.http.generator.core.*;
74

85
import java.io.IOException;
96

@@ -57,7 +54,7 @@ private void writeClassStart() {
5754
String controllerType = shortName;
5855
if (isRequestScoped()) {
5956
controllerName = "factory";
60-
controllerType += "$factory";
57+
controllerType += Constants.FACTORY_SUFFIX;
6158
}
6259
writer.append(" private final %s %s;", controllerType, controllerName).eol();
6360

http-generator-spark/src/main/java/io/avaje/http/generator/spark/ControllerWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ private void writeClassStart() {
5555
String controllerType = shortName;
5656
if (isRequestScoped()) {
5757
controllerName = "factory";
58-
controllerType += "$factory";
58+
controllerType += Constants.FACTORY_SUFFIX;
5959
}
6060
writer.append(" private final %s %s;", controllerType, controllerName).eol();
6161

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<module>http-generator-jex</module>
4040
<module>http-generator-helidon</module>
4141
<module>http-generator-client</module>
42-
<!-- <module>tests</module>-->
42+
<module>tests</module>
4343
</modules>
4444

4545
</project>

tests/test-helidon/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,17 @@
3636
<dependency>
3737
<groupId>io.avaje</groupId>
3838
<artifactId>avaje-http-api</artifactId>
39-
<version>1.2</version>
39+
<version>${avaje-http-version}</version>
4040
</dependency>
4141
<dependency>
4242
<groupId>io.avaje</groupId>
4343
<artifactId>avaje-inject</artifactId>
44-
<version>4.1</version>
44+
<version>6.0.RC4</version>
4545
</dependency>
4646
<dependency>
4747
<groupId>io.avaje</groupId>
4848
<artifactId>avaje-inject-generator</artifactId>
49-
<version>4.1</version>
49+
<version>6.0.RC4</version>
5050
<scope>provided</scope>
5151
</dependency>
5252

@@ -134,7 +134,7 @@
134134
<plugin>
135135
<groupId>io.repaint.maven</groupId>
136136
<artifactId>tiles-maven-plugin</artifactId>
137-
<version>2.17</version>
137+
<version>2.22</version>
138138
<extensions>true</extensions>
139139
<configuration>
140140
<tiles>

tests/test-javalin/pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,19 @@
5252
<dependency>
5353
<groupId>io.avaje</groupId>
5454
<artifactId>avaje-inject</artifactId>
55-
<version>4.1</version>
55+
<version>6.0.RC4</version>
5656
</dependency>
5757

5858
<dependency>
5959
<groupId>io.avaje</groupId>
6060
<artifactId>avaje-http-api</artifactId>
61-
<version>1.2</version>
61+
<version>${avaje-http-version}</version>
6262
</dependency>
6363

6464
<dependency>
6565
<groupId>io.avaje</groupId>
6666
<artifactId>avaje-http-hibernate-validator</artifactId>
67-
<version>2.0</version>
67+
<version>2.5</version>
6868
</dependency>
6969

7070
<dependency>
@@ -78,7 +78,7 @@
7878
<dependency>
7979
<groupId>io.avaje</groupId>
8080
<artifactId>avaje-inject-generator</artifactId>
81-
<version>4.1</version>
81+
<version>6.0.RC4</version>
8282
<scope>provided</scope>
8383
</dependency>
8484

@@ -136,7 +136,7 @@
136136
<plugin>
137137
<groupId>io.repaint.maven</groupId>
138138
<artifactId>tiles-maven-plugin</artifactId>
139-
<version>2.17</version>
139+
<version>2.22</version>
140140
<extensions>true</extensions>
141141
<configuration>
142142
<tiles>

tests/test-jex/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<jex.version>1.5</jex.version>
2020
<swagger.version>2.0.8</swagger.version>
2121
<jackson.version>2.12.3</jackson.version>
22-
<avaje-inject.version>6.0.RC3</avaje-inject.version>
22+
<avaje-inject.version>6.0.RC4</avaje-inject.version>
2323
<avaje-http.version>1.5-SNAPSHOT</avaje-http.version>
2424
</properties>
2525

@@ -58,7 +58,7 @@
5858
<dependency>
5959
<groupId>io.avaje</groupId>
6060
<artifactId>avaje-http-hibernate-validator</artifactId>
61-
<version>2.0</version>
61+
<version>2.5</version>
6262
</dependency>
6363

6464
<dependency>

tests/test-spark/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,19 @@
4343
<dependency>
4444
<groupId>io.avaje</groupId>
4545
<artifactId>avaje-inject</artifactId>
46-
<version>4.1</version>
46+
<version>6.0.RC4</version>
4747
</dependency>
4848

4949
<dependency>
5050
<groupId>io.avaje</groupId>
5151
<artifactId>avaje-http-api</artifactId>
52-
<version>1.2</version>
52+
<version>${avaje-http-version}</version>
5353
</dependency>
5454

5555
<dependency>
5656
<groupId>io.avaje</groupId>
5757
<artifactId>avaje-http-hibernate-validator</artifactId>
58-
<version>2.0</version>
58+
<version>2.5</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>4.1</version>
72+
<version>6.0.RC4</version>
7373
<scope>provided</scope>
7474
</dependency>
7575

0 commit comments

Comments
 (0)