Class ServerContextPathProviderUtils


  • @Internal
    public final class ServerContextPathProviderUtils
    extends java.lang.Object
    Utility methods to prepend a URL with the context path provided via ServerContextPathProvider.
    Since:
    3.7.1
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String prependContextPath​(java.lang.String url, io.micronaut.http.context.ServerContextPathProvider serverContextPathProvider)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • prependContextPath

        @NonNull
        public static java.lang.String prependContextPath​(@NonNull
                                                          java.lang.String url,
                                                          @NonNull
                                                          io.micronaut.http.context.ServerContextPathProvider serverContextPathProvider)
        Parameters:
        url - The url to be prefixed by the context path
        serverContextPathProvider - context path provider
        Returns:
        the url prepended with the context path. For url /bar and context path foo the method returns /foo/bar