Skip to content

Commit 1bd30f4

Browse files
authored
Merge pull request #588 from avaje/feature/jexRootPath
[jex generation] Root path generated as "/" rather than ""
2 parents 6571d95 + a995be6 commit 1bd30f4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ private void validateFilter() {
4343

4444
void writeRouting() {
4545
final PathSegments segments = method.pathSegments();
46-
final String fullPath = segments.fullPath();
46+
String fullPath = segments.fullPath();
47+
if (fullPath.isEmpty()) {
48+
fullPath = "/";
49+
}
4750

4851
if (method.isErrorMethod()) {
4952
writer.append(" routing.error(%s.class, this::_%s", method.exceptionShortName(), method.simpleName());

0 commit comments

Comments
 (0)