@Configuration @ConditionalOnClass(name={"org.glassfish.jersey.server.spring.SpringComponentProvider","javax.servlet.ServletRegistration"}) @ConditionalOnBean(type="org.glassfish.jersey.server.ResourceConfig") @ConditionalOnWebApplication @EnableConfigurationProperties(value=JerseyProperties.class) public class JerseyAutoConfiguration extends Object implements ServletContextAware
Auto-configuration
for Jersey.Modifier and Type | Class and Description |
---|---|
static class |
JerseyAutoConfiguration.JerseyWebApplicationInitializer |
Constructor and Description |
---|
JerseyAutoConfiguration(JerseyProperties jersey,
org.glassfish.jersey.server.ResourceConfig config,
ObjectProvider<List<ResourceConfigCustomizer>> customizers) |
Modifier and Type | Method and Description |
---|---|
FilterRegistrationBean |
jerseyFilterRegistration() |
ServletRegistrationBean |
jerseyServletRegistration() |
void |
path() |
FilterRegistrationBean |
requestContextFilter() |
void |
setServletContext(ServletContext servletContext) |
public JerseyAutoConfiguration(JerseyProperties jersey, org.glassfish.jersey.server.ResourceConfig config, ObjectProvider<List<ResourceConfigCustomizer>> customizers)
@PostConstruct public void path()
@Bean @ConditionalOnMissingBean public FilterRegistrationBean requestContextFilter()
@Bean @ConditionalOnMissingBean(name="jerseyFilterRegistration") @ConditionalOnProperty(prefix="spring.jersey", name="type", havingValue="filter") public FilterRegistrationBean jerseyFilterRegistration()
@Bean @ConditionalOnMissingBean(name="jerseyServletRegistration") @ConditionalOnProperty(prefix="spring.jersey", name="type", havingValue="servlet", matchIfMissing=true) public ServletRegistrationBean jerseyServletRegistration()
public void setServletContext(ServletContext servletContext)
setServletContext
in interface ServletContextAware
Copyright © 2017 Pivotal Software, Inc.. All rights reserved.