leangen / graphql-spqr-spring-boot-starter

Spring Boot 2 starter powered by GraphQL SPQR
Apache License 2.0
275 stars 68 forks source link

@ServletComponentScan throws exception as java.lang.IllegalStateException from spqr lib #117

Open manivannankannan opened 2 years ago

manivannankannan commented 2 years ago

Hi,

We are using spqr library in our application and pom.xml dependency as below,

      <dependency>
            <groupId>io.leangen.graphql</groupId>
            <artifactId>graphql-spqr-spring-boot-starter</artifactId>
            <version>0.0.6</version>
        </dependency>
When we include @ServletComponentScan for our Application and it throws IllegalStateException
--------------------------------------------------
@ServletComponentScan({ "com.test.cloud.sdk"})
public class Application {
--------------------------------------------------

Error log as,
-------------------------------------------------------------------------------------
com.test.cloud.sdk.cloudplatform.thread.exception.ThreadContextExecutionException: org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalStateException: Async support must be enabled on a servlet and for all filters involved in async request processing. This is done in Java code using the Servlet API or by adding "<async-supported>true</async-supported>" to servlet and filter declarations in web.xml.
    at com.test.cloud.sdk.cloudplatform.thread.AbstractThreadContextExecutor.execute(AbstractThreadContextExecutor.java:325)
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
    at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)
    at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
    at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)
---------------------------------------------------------------------------------------

Can you help us on this issue?

Thanks

kaqqao commented 1 year ago

Hey. I've only recently picked up this project again. Did you resolve this in the meantime or is it still an issue?