dgs-framework icon indicating copy to clipboard operation
dgs-framework copied to clipboard

The webflux build problem, No exclude autoconfig then report other error

Open ANUGLYPLUGIN opened this issue 3 years ago • 1 comments

Don't know whether it is a bug or not

Code is very simple,

  • Component
@Component
@DgsComponent
public class TestController {

    @DgsQuery
    public Integer test(@InputArgument Integer input) {
        return input + 10213123;
    }

}
  • Webflux config
@Configuration
@EnableWebFlux
public class Webflux implements WebFluxConfigurer {

    @Override
    public void addCorsMappings(CorsRegistry registry) {
        registry.addMapping("/**")
                .allowedOrigins("http://localhost:8000")
                .allowedHeaders("GET", "POST", "PUT", "DELETE")
                .maxAge(3600);
    }
}
  • Graphqls
type Query {
    test(input: Int): Int
}
  • maven
     <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.netflix.graphql.dgs</groupId>
                <artifactId>graphql-dgs-platform-dependencies</artifactId>
                <!-- The DGS BOM/platform dependency. This is the only place you set version of DGS -->
                <version>4.10.3</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependency>
            <groupId>com.netflix.graphql.dgs</groupId>
            <artifactId>graphql-dgs-webflux-starter</artifactId>
    </dependency>
  • Errors
***************************
APPLICATION FAILED TO START
***************************

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    reactor.netty.transport.ServerTransport$DisposableBind.<init>(ServerTransport.java:494)

The following method did not exist:

    'reactor.util.context.ContextView reactor.core.publisher.MonoSink.contextView()'


Action:

Correct the classpath of your application so that it contains compatible versions of the classes reactor.netty.transport.ServerTransport$DisposableBind and reactor.core.publisher.MonoSink

ANUGLYPLUGIN avatar May 27 '22 03:05 ANUGLYPLUGIN

So, what`s the fix?

blling avatar Jul 01 '22 06:07 blling