Package io.quarkus.vertx.http.deployment
Class HttpRootPathBuildItem
- java.lang.Object
-
- io.quarkus.builder.item.BuildItem
-
- io.quarkus.builder.item.SimpleBuildItem
-
- io.quarkus.vertx.http.deployment.HttpRootPathBuildItem
-
public final class HttpRootPathBuildItem extends io.quarkus.builder.item.SimpleBuildItem
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHttpRootPathBuildItem.Builder
-
Constructor Summary
Constructors Constructor Description HttpRootPathBuildItem(String rootPath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetRootPath()Return normalized Http root path configured from quarkus.http.root-path.StringresolvePath(String path)Resolve path into an absolute path.HttpRootPathBuildItem.BuilderrouteBuilder()
-
-
-
Constructor Detail
-
HttpRootPathBuildItem
public HttpRootPathBuildItem(String rootPath)
-
-
Method Detail
-
getRootPath
public String getRootPath()
Return normalized Http root path configured from quarkus.http.root-path. This path will always end in a slash.Use
resolvePath(String)if you need to construct a Uri from the Http root path.- Returns:
- Normalized Http root path ending with a slash
- See Also:
resolvePath(String)
-
resolvePath
public String resolvePath(String path)
Resolve path into an absolute path. If path is relative, it will be resolved against `quarkus.http.root-path`. An absolute path will be normalized and returned.Given quarkus.http.root-path=/
resolvePath("foo")will return /fooresolvePath("/foo")will return /foo
resolvePath("foo")will return /app/fooresolvePath("/foo")will return /foo
The returned path will not end with a slash.
- Parameters:
path- Path to be resolved to an absolute path.- Returns:
- An absolute path not ending with a slash
- See Also:
UriNormalizationUtil.normalizeWithBase(URI, String, boolean)
-
routeBuilder
public HttpRootPathBuildItem.Builder routeBuilder()
-
-