Search in sources :

Example 36 with AntPathMatcher

use of org.springframework.util.AntPathMatcher in project vorto by eclipse.

the class GenericGeneratorController method getExtractPath.

private String getExtractPath(final HttpServletRequest request) {
    String path = (String) request.getAttribute(HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE);
    String bestMatchPattern = (String) request.getAttribute(HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE);
    AntPathMatcher apm = new AntPathMatcher();
    return apm.extractPathWithinPattern(bestMatchPattern, path);
}
Also used : AntPathMatcher(org.springframework.util.AntPathMatcher)

Aggregations

AntPathMatcher (org.springframework.util.AntPathMatcher)36 Test (org.junit.jupiter.api.Test)13 SimpleRouteMatcher (org.springframework.util.SimpleRouteMatcher)11 Test (org.junit.Test)5 ReactiveAdapterRegistry (org.springframework.core.ReactiveAdapterRegistry)5 ByteArrayDecoder (org.springframework.core.codec.ByteArrayDecoder)4 ByteArrayEncoder (org.springframework.core.codec.ByteArrayEncoder)4 GenericMessage (org.springframework.messaging.support.GenericMessage)4 Message (org.springframework.messaging.Message)3 DefaultMetadataExtractor (org.springframework.messaging.rsocket.DefaultMetadataExtractor)3 RSocketStrategies (org.springframework.messaging.rsocket.RSocketStrategies)3 MessageHeaderAccessor (org.springframework.messaging.support.MessageHeaderAccessor)3 MockHttpServletRequest (org.springframework.mock.web.MockHttpServletRequest)3 MockHttpServletResponse (org.springframework.mock.web.MockHttpServletResponse)3 PathMatcher (org.springframework.util.PathMatcher)3 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 Assertions.assertThat (org.assertj.core.api.Assertions.assertThat)2 BeanFactory (org.springframework.beans.factory.BeanFactory)2 CharSequenceEncoder (org.springframework.core.codec.CharSequenceEncoder)2