Class HttpRootPathBuildItem


  • public final class HttpRootPathBuildItem
    extends io.quarkus.builder.item.SimpleBuildItem
    • 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 /foo
        • resolvePath("/foo") will return /foo
        Given quarkus.http.root-path=/app
        • resolvePath("foo") will return /app/foo
        • resolvePath("/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)