public static List < String > extractUriParams ( String url ) { List < String > outParams = new ArrayList <> ( ) ; if ( StringUtils . hasText ( url ) ) { String [ ] split = StringUtils . split ( url , "/" ) ; for ( String part : split ) { int indexOfStart = part . indexOf ( "{" ) ; int indexOfEnd = part . indexOf ( "}" ) ; if ( indexOfStart != - 1 && indexOfEnd != - 1 && indexOfStart < indexOfEnd ) { outParams . add ( part . substring ( indexOfStart + 1 , indexOfEnd ) ) ; } } } return outParams ; }
Extracts a list of URI Parameters from a url