@Bean @Lazy public HandlerMappingIntrospector mvcHandlerMappingIntrospector() { return new HandlerMappingIntrospector(); }
@Bean @Lazy public HandlerMappingIntrospector mvcHandlerMappingIntrospector() { return new HandlerMappingIntrospector(); }
private HandlerMappingIntrospector getIntrospector(WebApplicationContext cxt) { HandlerMappingIntrospector introspector = new HandlerMappingIntrospector(); introspector.setApplicationContext(cxt); introspector.afterPropertiesSet(); return introspector; }
/** * Allows configuring the {@link HttpSecurity} to only be invoked when matching the * provided Spring MVC pattern. If more advanced configuration is necessary, consider using * {@link #requestMatchers()} or {@link #requestMatcher(RequestMatcher)}. * * <p> * Invoking {@link #mvcMatcher(String)} will override previous invocations of {@link #mvcMatcher(String)}}, * {@link #requestMatchers()}, {@link #antMatcher(String)}, * {@link #regexMatcher(String)}, and {@link #requestMatcher(RequestMatcher)}. * </p> * * @param mvcPattern the Spring MVC Pattern to match on (i.e. "/admin/**") * @return the {@link HttpSecurity} for further customizations * @see MvcRequestMatcher */ public HttpSecurity mvcMatcher(String mvcPattern) { HandlerMappingIntrospector introspector = new HandlerMappingIntrospector(getContext()); return requestMatcher(new MvcRequestMatcher(introspector, mvcPattern)); }
/** * Allows configuring the {@link HttpSecurity} to only be invoked when matching the * provided Spring MVC pattern. If more advanced configuration is necessary, consider using * {@link #requestMatchers()} or {@link #requestMatcher(RequestMatcher)}. * * <p> * Invoking {@link #mvcMatcher(String)} will override previous invocations of {@link #mvcMatcher(String)}}, * {@link #requestMatchers()}, {@link #antMatcher(String)}, * {@link #regexMatcher(String)}, and {@link #requestMatcher(RequestMatcher)}. * </p> * * @param mvcPattern the Spring MVC Pattern to match on (i.e. "/admin/**") * @return the {@link HttpSecurity} for further customizations * @see MvcRequestMatcher */ public HttpSecurity mvcMatcher(String mvcPattern) { HandlerMappingIntrospector introspector = new HandlerMappingIntrospector(getContext()); return requestMatcher(new MvcRequestMatcher(introspector, mvcPattern)); }
@Bean @Lazy public HandlerMappingIntrospector mvcHandlerMappingIntrospector() { return new HandlerMappingIntrospector(); }
@SuppressWarnings("deprecation") @Bean public WebMvcMetricsFilter webMetricsFilter(MeterRegistry registry, WebMvcTagsProvider tagsProvider, WebApplicationContext ctx) { return new WebMvcMetricsFilter(registry, tagsProvider, properties.getWeb().getServer().getRequestsMetricName(), properties.getWeb().getServer().isAutoTimeRequests(), new HandlerMappingIntrospector(ctx)); }
/** * Allows configuring the {@link HttpSecurity} to only be invoked when matching the * provided Spring MVC pattern. If more advanced configuration is necessary, consider using * {@link #requestMatchers()} or {@link #requestMatcher(RequestMatcher)}. * * <p> * Invoking {@link #mvcMatcher(String)} will override previous invocations of {@link #mvcMatcher(String)}}, * {@link #requestMatchers()}, {@link #antMatcher(String)}, * {@link #regexMatcher(String)}, and {@link #requestMatcher(RequestMatcher)}. * </p> * * @param mvcPattern the Spring MVC Pattern to match on (i.e. "/admin/**") * @return the {@link HttpSecurity} for further customizations * @see MvcRequestMatcher */ public HttpSecurity mvcMatcher(String mvcPattern) { HandlerMappingIntrospector introspector = new HandlerMappingIntrospector(getContext()); return requestMatcher(new MvcRequestMatcher(introspector, mvcPattern)); }