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

bug: NoSuchBeanDefinitionException with com.netflix.graphql.dgs.autoconfig.DgsIntrospectionConfigurationProperties in docker container

Open mandyGitH opened this issue 2 years ago • 0 comments

Using the following dependencies in build.gradle: implementation(platform('com.netflix.graphql.dgs:graphql-dgs-platform-dependencies:4.9.21')) implementation 'com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter:4.9.21' implementation 'com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets:4.9.21' implementation 'com.netflix.graphql.dgs:graphql-dgs-spring-webmvc:4.9.21' implementation 'com.netflix.graphql.dgs:graphql-dgs-spring-webmvc-autoconfigure:4.9.21' implementation 'com.apollographql.federation:federation-graphql-java-support:0.9.0' implementation 'com.netflix.graphql.dgs:graphql-dgs-spring-boot-oss-autoconfigure:4.9.22'

Expected behavior

Local builds work fine. Unit tests pass. Deployment to VMs works.

Actual behavior

Local builds work fine. Unit tests pass. When deploying to VMs, encountered the error below: Note: Build jar file works locally as well.

Error creating bean with name 'dgs.graphql.introspection- com.netflix.graphql.dgs.autoconfig.DgsIntrospectionConfigurationProperties': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'boolean' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.boot.context.properties.bind.DefaultValue(value={"true"})}

Description:

Parameter 0 of constructor in com.netflix.graphql.dgs.autoconfig.DgsIntrospectionConfigurationProperties required a bean of type 'boolean' that could not be found.

The injection point has the following annotations: - @org.springframework.boot.context.properties.bind.DefaultValue(value={"true"})

Action:

Consider defining a bean of type 'boolean' in your configuration. Consider adding a dependency on kotlin-reflect so that the constructor used for @ConstructorBinding can be located. Also, ensure that @ConstructorBinding is present on 'com.netflix.graphql.dgs.autoconfig.DgsIntrospectionConfigurationProperties' if you intended to use constructor-based configuration property binding.

error

mandyGitH avatar Mar 16 '22 22:03 mandyGitH