com.holonplatform.jaxrs.spring.boot.resteasy

## Class ResteasyAutoConfiguration

- java.lang.Object
- - com.holonplatform.jaxrs.spring.boot.resteasy.ResteasyAutoConfiguration

-     @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

  Spring boot auto configuration to setup Resteasy using a `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.

  Since:
    5.0.0

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ResteasyAutoConfiguration(ResteasyConfigurationProperties resteasy, ResteasyConfig config, org.springframework.beans.factory.ObjectProvider<List<ResteasyConfigCustomizer>> customizers)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    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()`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ResteasyAutoConfiguration

          public ResteasyAutoConfiguration(ResteasyConfigurationProperties resteasy,
                                           ResteasyConfig config,
                                           org.springframework.beans.factory.ObjectProvider<List<ResteasyConfigCustomizer>> customizers)

  - ### Method Detail

    - #### path

          @PostConstruct
          public void path()

    - #### resteasySpringBeanProcessor

          @Bean
          public static org.jboss.resteasy.plugins.spring.SpringBeanProcessor resteasySpringBeanProcessor()

    - #### resteasyBootstrap

          @Bean
          public javax.servlet.ServletContextListener resteasyBootstrap(org.jboss.resteasy.plugins.spring.SpringBeanProcessor springBeanProcessor)

    - #### resteasyServletRegistration

          @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()

    - #### resteasyFilterRegistration

          @Bean
           @ConditionalOnMissingBean(name="jerseyFilterRegistration")
           @ConditionalOnProperty(prefix="holon.resteasy",
                                 name="type",
                                 havingValue="filter")
          public org.springframework.boot.web.servlet.FilterRegistrationBean<javax.servlet.Filter> resteasyFilterRegistration()

    - #### contextInitParamsInitializer

          @Bean
          public org.springframework.boot.web.servlet.ServletContextInitializer contextInitParamsInitializer(ResteasyConfigurationProperties resteasy)

Copyright © 2019 The Holon Platform. All rights reserved.