You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
c4122b8f8d
FacesListener in Mojarra 2.2.12 (used in Glassfish 4.1.1) is a ServletContainerInitializer that’s annotated to handle types annotated with javax.annotation.Resource. OAuth2RestOperationsConfiguration.SessionScopedConfiguration is one such class. This leads to com.sun.faces.config.DelegatingAnnotationProvider calling getAnnotations on SessionScopedConfiguration.class. This fails with a java.lang.ArrayStoreException due to SessionScopedConfiguration being annotated with @ConditionalOnBean(OAuth2ClientConfiguration) and OAuth2ClientConfiguration not being on the classpath. DelegatingAnnotationProvider currently catches NoClassDefFoundErrors thrown during its annotation processing. It needs to be made more robust so that it also copes with an ArrayStoreException, in a similar way to how org.glassfish.apf.impl.AnnotationProcessorImpl was updated to fix GLASSFISH-21265 [1]. I’ve opened an issue to this effect [2]. In the meantime, we can work around the brittleness in DelegatingAnnotationProvider by restructuring SessionScopedConfiguration. This commit moves the use of @Resource into a nested inner class, ClientContextConfiguration, while leaving the use of @ConditionalOnBean on SessionScopedConfiguration. This means that it is now ClientContextConfiguration that is passed to FacesListener and processed by DelegatingAnnotationProcessor, thereby avoiding exposing it to the @ConditionalOnBean annotation that it does not handle gracefully. A Glassfish-based deployment test has also been added to verify the fix. Closes gh-2079 Closes gh-4321 [1] https://java.net/jira/browse/GLASSFISH-21265 [2] https://java.net/jira/browse/JAVASERVERFACES-4076 |
9 years ago | |
---|---|---|
.. | ||
spring-boot-sample-activemq | 9 years ago | |
spring-boot-sample-actuator | 9 years ago | |
spring-boot-sample-actuator-log4j | 9 years ago | |
spring-boot-sample-actuator-log4j2 | 9 years ago | |
spring-boot-sample-actuator-noweb | 9 years ago | |
spring-boot-sample-actuator-ui | 9 years ago | |
spring-boot-sample-amqp | 9 years ago | |
spring-boot-sample-ant | 9 years ago | |
spring-boot-sample-aop | 9 years ago | |
spring-boot-sample-atmosphere | 9 years ago | |
spring-boot-sample-batch | 9 years ago | |
spring-boot-sample-cache | 9 years ago | |
spring-boot-sample-data-cassandra | 9 years ago | |
spring-boot-sample-data-elasticsearch | 9 years ago | |
spring-boot-sample-data-gemfire | 9 years ago | |
spring-boot-sample-data-jpa | 9 years ago | |
spring-boot-sample-data-mongodb | 9 years ago | |
spring-boot-sample-data-redis | 9 years ago | |
spring-boot-sample-data-rest | 9 years ago | |
spring-boot-sample-data-solr | 9 years ago | |
spring-boot-sample-devtools | 9 years ago | |
spring-boot-sample-flyway | 9 years ago | |
spring-boot-sample-hateoas | 9 years ago | |
spring-boot-sample-hornetq | 9 years ago | |
spring-boot-sample-hypermedia | 9 years ago | |
spring-boot-sample-hypermedia-gson | 9 years ago | |
spring-boot-sample-hypermedia-jpa | 9 years ago | |
spring-boot-sample-hypermedia-ui | 9 years ago | |
spring-boot-sample-integration | 9 years ago | |
spring-boot-sample-jersey | 9 years ago | |
spring-boot-sample-jersey1 | 9 years ago | |
spring-boot-sample-jetty | 9 years ago | |
spring-boot-sample-jetty-ssl | 9 years ago | |
spring-boot-sample-jetty8 | 9 years ago | |
spring-boot-sample-jetty8-ssl | 9 years ago | |
spring-boot-sample-jetty93 | 9 years ago | |
spring-boot-sample-jooq | 9 years ago | |
spring-boot-sample-jpa | 9 years ago | |
spring-boot-sample-jta-atomikos | 9 years ago | |
spring-boot-sample-jta-bitronix | 9 years ago | |
spring-boot-sample-jta-jndi | 9 years ago | |
spring-boot-sample-liquibase | 9 years ago | |
spring-boot-sample-logback | 9 years ago | |
spring-boot-sample-metrics-dropwizard | 9 years ago | |
spring-boot-sample-metrics-opentsdb | 9 years ago | |
spring-boot-sample-metrics-redis | 9 years ago | |
spring-boot-sample-parent-context | 9 years ago | |
spring-boot-sample-profile | 9 years ago | |
spring-boot-sample-property-validation | 9 years ago | |
spring-boot-sample-secure | 9 years ago | |
spring-boot-sample-secure-oauth2 | 9 years ago | |
spring-boot-sample-secure-sso | 9 years ago | |
spring-boot-sample-servlet | 9 years ago | |
spring-boot-sample-session-redis | 9 years ago | |
spring-boot-sample-simple | 9 years ago | |
spring-boot-sample-testng | 9 years ago | |
spring-boot-sample-tomcat | 9 years ago | |
spring-boot-sample-tomcat-jsp | 9 years ago | |
spring-boot-sample-tomcat-multi-connectors | 9 years ago | |
spring-boot-sample-tomcat-ssl | 9 years ago | |
spring-boot-sample-tomcat7-jsp | 9 years ago | |
spring-boot-sample-traditional | 9 years ago | |
spring-boot-sample-undertow | 9 years ago | |
spring-boot-sample-undertow-ssl | 9 years ago | |
spring-boot-sample-velocity | 9 years ago | |
spring-boot-sample-war | 9 years ago | |
spring-boot-sample-web-freemarker | 9 years ago | |
spring-boot-sample-web-groovy-templates | 9 years ago | |
spring-boot-sample-web-jsp | 9 years ago | |
spring-boot-sample-web-method-security | 9 years ago | |
spring-boot-sample-web-mustache | 9 years ago | |
spring-boot-sample-web-secure | 9 years ago | |
spring-boot-sample-web-secure-custom | 9 years ago | |
spring-boot-sample-web-secure-github | 9 years ago | |
spring-boot-sample-web-secure-jdbc | 9 years ago | |
spring-boot-sample-web-static | 9 years ago | |
spring-boot-sample-web-ui | 9 years ago | |
spring-boot-sample-web-velocity | 9 years ago | |
spring-boot-sample-websocket-jetty | 9 years ago | |
spring-boot-sample-websocket-tomcat | 9 years ago | |
spring-boot-sample-websocket-undertow | 9 years ago | |
spring-boot-sample-ws | 9 years ago | |
spring-boot-sample-xml | 9 years ago | |
README.adoc | 9 years ago | |
pom.xml | 9 years ago |
README.adoc
The following java samples are provided: * link:spring-boot-sample-simple[spring-boot-sample-simple] -- A simple command line application * link:spring-boot-sample-tomcat[spring-boot-sample-tomcat] -- Embedded Tomcat * link:spring-boot-sample-jetty[spring-boot-sample-jetty] -- Embedded Jetty * link:spring-boot-sample-activemq[spring-boot-sample-activemq] -- Simple JMS consumer and producer using Apache ActiveMQ * link:spring-boot-sample-actuator[spring-boot-sample-actuator] -- Simple REST service with production features * link:spring-boot-sample-actuator-ui[spring-boot-sample-actuator-ui] -- A web UI example with production features * link:spring-boot-sample-actuator-noweb[spring-boot-sample-actuator-noweb] -- A production features sample with no web application * link:spring-boot-sample-actuator-log4j[spring-boot-sample-actuator-log4j] -- A production features sample using log4j for logging (instead of logback) * link:spring-boot-sample-cache[spring-boot-sample-cache] -- A web sample that uses Spring's cache abstraction * link:spring-boot-sample-web-ui[spring-boot-sample-web-ui] -- A thymeleaf web application * link:spring-boot-sample-web-static[spring-boot-sample-web-static] -- A web application serving static files * link:spring-boot-sample-web-freemarker[spring-boot-sample-web-freemarker] -- A web application using Freemarker templates * link:spring-boot-sample-web-velocity[spring-boot-sample-web-velocity] -- A web application using Velocity templates * link:spring-boot-sample-web-groovy-templates[spring-boot-sample-web-groovy-templates] -- A web application using native Groovy templates * link:spring-boot-sample-web-jsp[spring-boot-sample-web-jsp] -- A web application using JSP templates * link:spring-boot-sample-web-tomcat-jsp[spring-boot-sample-tomcat-jsp] -- A web application using JSP templates with Tomcat 8 * link:spring-boot-sample-tomcat-multi-connectors[spring-boot-sample-tomcat-multi-connectors] -- A web application using multiple connectors in tomcat, showing how to customize the Tomcat server * link:spring-boot-sample-web-secure[spring-boot-sample-web-secure] -- A web application with typical Security configuration enabling a login form * link:spring-boot-sample-web-method-security[spring-boot-sample-web-method-security] -- A web application with Security configuration enabling global method security * link:spring-boot-sample-secure[spring-boot-sample-secure] -- example showing Spring Security in a non-web application * link:spring-boot-sample-servlet[spring-boot-sample-servlet] -- example showing a "raw" `Servlet` returning plaintext content * link:spring-boot-sample-ws[spring-boot-sample-ws] -- A simple contract-first SOAP web service with Spring Web Services * link:spring-boot-sample-websocket-jetty[spring-boot-sample-websocket-jetty] -- A web application with Websocket support on Jetty server * link:spring-boot-sample-websocket-tomcat[spring-boot-sample-websocket-tomcat] -- A web application with Websocket support on Tomcat server * link:spring-boot-sample-websocket-undertow[spring-boot-sample-websocket-undertow] -- A web application with Websocket support on Undertow server * link:spring-boot-sample-flyway[spring-boot-sample-flyway] -- Example showing database migrations with Flyway * link:spring-boot-sample-liquibase[spring-boot-sample-liquibase] -- Example showing database migrations with Liquibase * link:spring-boot-sample-amqp[spring-boot-sample-amqp] -- Example showing message-oriented application using RabbitMQ * link:spring-boot-sample-hornetq[spring-boot-sample-hornetq] -- Example showing message-oriented application using HornetQ * link:spring-boot-sample-batch[spring-boot-sample-batch] -- Define and run a Batch job in a few lines of code * link:spring-boot-sample-data-jpa[spring-boot-sample-data-jpa] -- Spring Data JPA + Hibernate + HSQLDB * link:spring-boot-sample-data-mongodb[spring-boot-sample-data-mongodb] -- Spring Data Mongo repositories * link:spring-boot-sample-data-solr[spring-boot-sample-data-solr] -- Spring Data Solr repositories * link:spring-boot-sample-data-redis[spring-boot-sample-data-redis] -- Simple usage of Spring Data Redis * link:spring-boot-sample-data-rest[spring-boot-sample-data-rest] -- Crud repositories exposed as REST endpoints * link:spring-boot-sample-integration[spring-boot-sample-integration] -- A spring integration application * link:spring-boot-sample-profile[spring-boot-sample-profile] -- example showing Spring's `@profile` support * link:spring-boot-sample-property-validation[spring-boot-sample-property-validation] -- example showing the usage of `@ConfigurationProperties` with a Spring `Validator` * link:spring-boot-sample-parent-context[spring-boot-sample-parent-context] -- example showing an `ApplicationContext` with a parent * link:spring-boot-sample-aop[spring-boot-sample-aop] -- shows explicit usage of Spring AOP * link:spring-boot-sample-traditional[spring-boot-sample-traditional] -- shows more traditional WAR packaging (but also executable using `java -jar`) * link:spring-boot-sample-xml[spring-boot-sample-xml] -- Example show how Spring Boot can be mixed with traditional XML configuration (we generally recommend using Java `@Configuration` whenever possible)