@Configuration
@ConditionalOnClass(name={"org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap","javax.servlet.ServletRegistration"})
@ConditionalOnWebApplication
@AutoConfigureBefore(value=org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration.class)
@AutoConfigureAfter(value=org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration.class)
@EnableConfigurationProperties(value=ResteasyConfigurationProperties.class)
public class ResteasyAutoConfiguration
extends Object
ResteasyConfig JAX-RS Application bean and automatically register any
JAX-RS resource which is declared as a Spring bean, such as Path and
Provider annotated beans.
If a ResteasyConfig bean is not provided in Spring context, a default
one will be created and registered automatically. You can use
ResteasyConfig class to explicitly register JAX-RS endpoint/provider
classes, singleton resources and configuration properties.
The ResteasyConfigCustomizer interface can be used to customize
application resources registration. Any Spring bean which implements such
interface is automatically detected and the
ResteasyConfigCustomizer.customize(ResteasyConfig) method is invoked.
The Resteasy JAX-RS application path can be defined either using the
ApplicationPath annotation on the ResteasyConfig bean class
or through the holon.resteasy.application-path configuration
property. See ResteasyConfigurationProperties for a list of available
configuration properties.
| Constructor and Description |
|---|
ResteasyAutoConfiguration(ResteasyConfigurationProperties resteasy,
ResteasyConfig config,
org.springframework.beans.factory.ObjectProvider<List<ResteasyConfigCustomizer>> customizers) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.boot.web.servlet.ServletContextInitializer |
contextInitParamsInitializer(ResteasyConfigurationProperties resteasy) |
void |
path() |
javax.servlet.ServletContextListener |
resteasyBootstrap(org.jboss.resteasy.plugins.spring.SpringBeanProcessor springBeanProcessor) |
org.springframework.boot.web.servlet.FilterRegistrationBean<javax.servlet.Filter> |
resteasyFilterRegistration() |
org.springframework.boot.web.servlet.ServletRegistrationBean<javax.servlet.Servlet> |
resteasyServletRegistration() |
static org.jboss.resteasy.plugins.spring.SpringBeanProcessor |
resteasySpringBeanProcessor() |
public ResteasyAutoConfiguration(ResteasyConfigurationProperties resteasy, ResteasyConfig config, org.springframework.beans.factory.ObjectProvider<List<ResteasyConfigCustomizer>> customizers)
@PostConstruct public void path()
@Bean public static org.jboss.resteasy.plugins.spring.SpringBeanProcessor resteasySpringBeanProcessor()
@Bean public javax.servlet.ServletContextListener resteasyBootstrap(org.jboss.resteasy.plugins.spring.SpringBeanProcessor springBeanProcessor)
@Bean
@ConditionalOnMissingBean(name="resteasyServletRegistration")
@ConditionalOnProperty(prefix="holon.resteasy",
name="type",
havingValue="servlet",
matchIfMissing=true)
public org.springframework.boot.web.servlet.ServletRegistrationBean<javax.servlet.Servlet> resteasyServletRegistration()
@Bean
@ConditionalOnMissingBean(name="jerseyFilterRegistration")
@ConditionalOnProperty(prefix="holon.resteasy",
name="type",
havingValue="filter")
public org.springframework.boot.web.servlet.FilterRegistrationBean<javax.servlet.Filter> resteasyFilterRegistration()
@Bean public org.springframework.boot.web.servlet.ServletContextInitializer contextInitParamsInitializer(ResteasyConfigurationProperties resteasy)
Copyright © 2019 The Holon Platform. All rights reserved.