@ Bean public FilterRegistrationBean jerseyFilterRegistration ( javax . ws . rs . core . Application eurekaJerseyApp ) { FilterRegistrationBean bean = new FilterRegistrationBean ( ) ; bean . setFilter ( new ServletContainer ( eurekaJerseyApp ) ) ; bean . setOrder ( Ordered . LOWEST_PRECEDENCE ) ; bean . setUrlPatterns ( Collections . singletonList ( EurekaConstants . DEFAULT_PREFIX + "/*" ) ) ; return bean ; }
Register the Jersey filter .