Closed cxrdevx closed 4 years ago
@stavshamir
What version of springfox are you using? Please provide your build.gradle or pom.xml.
` <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.6.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>demo</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>1.8</java.version>
<spring-cloud.version>Greenwich.SR3</spring-cloud.version>
</properties>
<repositories>
<repository>
<id>jcenter-snapshots</id>
<name>jcenter</name>
<url>http://oss.jfrog.org/artifactory/oss-snapshot-local/</url>
</repository>
<repository>
<id>jcenter</id>
<url>https://jcenter.bintray.com/</url>
</repository>
</repositories>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>3.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>3.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-spring-webflux</artifactId>
<version>3.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb-reactive</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.github.stavshamir</groupId>
<artifactId>swagger4kafka</artifactId>
<version>0.0.1</version>
</dependency>
<dependency>
<groupId>io.github.stavshamir</groupId>
<artifactId>swagger4kafka-ui</artifactId>
<version>0.0.1</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-common</artifactId>
<version>3.0.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
`
Does it work with an older version of springfox?
You could try excluding the springfox dependency. You can see what version swagger4kafka is actually using running mvn dependency:tree
(currently version 2.8.0):
[INFO] +- io.github.stavshamir:swagger4kafka:jar:0.0.1:compile
[INFO] | +- io.swagger:swagger-inflector:jar:1.0.16:runtime
[INFO] | | +- io.swagger:swagger-jersey2-jaxrs:jar:1.5.21:runtime
[INFO] | | | \- io.swagger:swagger-jaxrs:jar:1.5.21:runtime
[INFO] | | | \- org.reflections:reflections:jar:0.9.11:runtime
[INFO] | | +- io.swagger:swagger-parser:jar:1.0.38:runtime
[INFO] | | | \- io.swagger:swagger-core:jar:1.5.21:runtime
[INFO] | | | \- javax.validation:validation-api:jar:2.0.1.Final:runtime
[INFO] | | +- org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.29.1:runtime
[INFO] | | | +- org.glassfish.hk2.external:jakarta.inject:jar:2.6.1:runtime
[INFO] | | | +- org.glassfish.jersey.core:jersey-common:jar:2.29.1:runtime
[INFO] | | | | \- org.glassfish.hk2:osgi-resource-locator:jar:1.0.3:runtime
[INFO] | | | +- org.glassfish.jersey.core:jersey-server:jar:2.29.1:runtime
[INFO] | | | | \- org.glassfish.jersey.media:jersey-media-jaxb:jar:2.29.1:runtime
[INFO] | | | \- jakarta.ws.rs:jakarta.ws.rs-api:jar:2.1.6:runtime
[INFO] | | +- org.glassfish.jersey.media:jersey-media-multipart:jar:2.29.1:runtime
[INFO] | | | \- org.jvnet.mimepull:mimepull:jar:1.9.13:runtime
[INFO] | | +- org.glassfish.jersey.core:jersey-client:jar:2.29.1:runtime
[INFO] | | +- ch.qos.logback:logback-classic:jar:1.2.3:runtime
[INFO] | | +- ch.qos.logback:logback-core:jar:1.2.3:runtime
[INFO] | | +- org.slf4j:slf4j-ext:jar:1.7.30:runtime
[INFO] | | +- commons-lang:commons-lang:jar:2.4:runtime
[INFO] | | +- org.apache.commons:commons-csv:jar:1.1:runtime
[INFO] | | +- commons-io:commons-io:jar:2.5:runtime
[INFO] | | +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.10.3:runtime
[INFO] | | | \- com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.10.3:runtime
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-joda:jar:2.10.3:runtime
[INFO] | | | \- joda-time:joda-time:jar:2.10.5:runtime
[INFO] | | +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-xml-provider:jar:2.10.3:runtime
[INFO] | | | +- com.fasterxml.jackson.dataformat:jackson-dataformat-xml:jar:2.10.3:runtime
[INFO] | | | +- org.codehaus.woodstox:stax2-api:jar:4.2:runtime
[INFO] | | | \- com.fasterxml.woodstox:woodstox-core:jar:6.0.1:runtime
[INFO] | | +- com.github.java-json-tools:json-schema-validator:jar:2.2.8:runtime
[INFO] | | | +- com.github.java-json-tools:json-schema-core:jar:1.2.8:runtime
[INFO] | | | | +- org.mozilla:rhino:jar:1.7R4:runtime
[INFO] | | | | +- com.github.fge:jackson-coreutils:jar:1.8:runtime
[INFO] | | | | | \- com.github.fge:msg-simple:jar:1.1:runtime
[INFO] | | | | | \- com.github.fge:btf:jar:1.2:runtime
[INFO] | | | | \- com.github.fge:uri-template:jar:0.9:runtime
[INFO] | | | +- javax.mail:mailapi:jar:1.4.3:runtime
[INFO] | | | \- com.googlecode.libphonenumber:libphonenumber:jar:8.0.0:runtime
[INFO] | | \- commons-fileupload:commons-fileupload:jar:1.3.1:runtime
[INFO] | \- io.springfox:springfox-core:jar:2.8.0:compile
[INFO] \- io.github.stavshamir:swagger4kafka-ui:jar:0.0.1:compile
You can exclude it like this:
<dependency>
<groupId>io.github.stavshamir</groupId>
<artifactId>swagger4kafka</artifactId>
<version>0.0.1</version>
<exclusions>
<exclusion>
<groupId>io.springfox</groupId>
<artifactId>springfox-core</artifactId>
</exclusion>
</exclusions>
</dependency>
I am using SpringWebFlux so I can only use version 3.0.0-SNAPSHOT
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building demo 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:3.1.2:tree (default-cli) @ demo ---
[INFO] com.example:demo:jar:0.0.1-SNAPSHOT
[INFO] +- io.springfox:springfox-swagger2:jar:3.0.0-SNAPSHOT:compile
[INFO] | +- io.swagger:swagger-annotations:jar:1.5.20:compile
[INFO] | +- io.swagger:swagger-models:jar:1.5.20:compile
[INFO] | | \- com.fasterxml.jackson.core:jackson-annotations:jar:2.10.3:compile
[INFO] | +- io.springfox:springfox-spi:jar:3.0.0-SNAPSHOT:compile
[INFO] | | \- io.springfox:springfox-core:jar:3.0.0-SNAPSHOT:compile
[INFO] | +- io.springfox:springfox-schema:jar:3.0.0-SNAPSHOT:compile
[INFO] | +- io.springfox:springfox-swagger-common:jar:3.0.0-SNAPSHOT:compile
[INFO] | +- io.springfox:springfox-spring-web:jar:3.0.0-SNAPSHOT:compile
[INFO] | | \- io.github.classgraph:classgraph:jar:4.1.7:compile
[INFO] | +- com.fasterxml:classmate:jar:1.5.1:compile
[INFO] | +- org.slf4j:slf4j-api:jar:1.7.30:compile
[INFO] | +- org.springframework.plugin:spring-plugin-core:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.springframework:spring-beans:jar:5.2.5.RELEASE:compile
[INFO] | | \- org.springframework:spring-aop:jar:5.2.5.RELEASE:compile
[INFO] | +- org.springframework.plugin:spring-plugin-metadata:jar:2.0.0.RELEASE:compile
[INFO] | \- org.mapstruct:mapstruct:jar:1.3.1.Final:compile
[INFO] +- io.springfox:springfox-swagger-ui:jar:3.0.0-SNAPSHOT:compile
[INFO] +- io.springfox:springfox-spring-webflux:jar:3.0.0-SNAPSHOT:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-mongodb-reactive:jar:2.2.6.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:2.2.6.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-logging:jar:2.2.6.RELEASE:compile
[INFO] | | | +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.12.1:compile
[INFO] | | | | \- org.apache.logging.log4j:log4j-api:jar:2.12.1:compile
[INFO] | | | \- org.slf4j:jul-to-slf4j:jar:1.7.30:compile
[INFO] | | +- jakarta.annotation:jakarta.annotation-api:jar:1.3.5:compile
[INFO] | | \- org.yaml:snakeyaml:jar:1.25:runtime
[INFO] | +- org.springframework.data:spring-data-mongodb:jar:2.2.6.RELEASE:compile
[INFO] | | +- org.springframework:spring-expression:jar:5.2.5.RELEASE:compile
[INFO] | | \- org.springframework.data:spring-data-commons:jar:2.2.6.RELEASE:compile
[INFO] | +- org.mongodb:mongodb-driver:jar:3.11.2:compile
[INFO] | | +- org.mongodb:bson:jar:3.11.2:compile
[INFO] | | \- org.mongodb:mongodb-driver-core:jar:3.11.2:compile
[INFO] | +- org.mongodb:mongodb-driver-async:jar:3.11.2:compile
[INFO] | +- org.mongodb:mongodb-driver-reactivestreams:jar:1.12.0:compile
[INFO] | | \- org.reactivestreams:reactive-streams:jar:1.0.3:compile
[INFO] | \- io.projectreactor:reactor-core:jar:3.3.4.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-webflux:jar:2.2.6.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-json:jar:2.2.6.RELEASE:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.10.3:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.10.3:compile
[INFO] | | \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.10.3:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-reactor-netty:jar:2.2.6.RELEASE:compile
[INFO] | | +- io.projectreactor.netty:reactor-netty:jar:0.9.6.RELEASE:compile
[INFO] | | | +- io.netty:netty-codec-http:jar:4.1.48.Final:compile
[INFO] | | | | +- io.netty:netty-common:jar:4.1.48.Final:compile
[INFO] | | | | +- io.netty:netty-buffer:jar:4.1.48.Final:compile
[INFO] | | | | +- io.netty:netty-transport:jar:4.1.48.Final:compile
[INFO] | | | | \- io.netty:netty-codec:jar:4.1.48.Final:compile
[INFO] | | | +- io.netty:netty-codec-http2:jar:4.1.48.Final:compile
[INFO] | | | +- io.netty:netty-handler:jar:4.1.48.Final:compile
[INFO] | | | | \- io.netty:netty-resolver:jar:4.1.48.Final:compile
[INFO] | | | +- io.netty:netty-handler-proxy:jar:4.1.48.Final:compile
[INFO] | | | | \- io.netty:netty-codec-socks:jar:4.1.48.Final:compile
[INFO] | | | \- io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.48.Final:compile
[INFO] | | | \- io.netty:netty-transport-native-unix-common:jar:4.1.48.Final:compile
[INFO] | | \- org.glassfish:jakarta.el:jar:3.0.3:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-validation:jar:2.2.6.RELEASE:compile
[INFO] | | +- jakarta.validation:jakarta.validation-api:jar:2.0.2:compile
[INFO] | | \- org.hibernate.validator:hibernate-validator:jar:6.0.18.Final:compile
[INFO] | | \- org.jboss.logging:jboss-logging:jar:3.4.1.Final:compile
[INFO] | +- org.springframework:spring-web:jar:5.2.5.RELEASE:compile
[INFO] | +- org.springframework:spring-webflux:jar:5.2.5.RELEASE:compile
[INFO] | \- org.synchronoss.cloud:nio-multipart-parser:jar:1.1.0:compile
[INFO] | \- org.synchronoss.cloud:nio-stream-storage:jar:1.1.3:compile
[INFO] +- org.springframework.kafka:spring-kafka:jar:2.3.7.RELEASE:compile
[INFO] | +- org.apache.kafka:kafka-clients:jar:2.3.1:compile
[INFO] | | +- com.github.luben:zstd-jni:jar:1.4.0-1:compile
[INFO] | | +- org.lz4:lz4-java:jar:1.6.0:compile
[INFO] | | \- org.xerial.snappy:snappy-java:jar:1.1.7.3:compile
[INFO] | +- org.springframework.retry:spring-retry:jar:1.2.5.RELEASE:compile
[INFO] | +- org.springframework:spring-context:jar:5.2.5.RELEASE:compile
[INFO] | +- org.springframework:spring-messaging:jar:5.2.5.RELEASE:compile
[INFO] | \- org.springframework:spring-tx:jar:5.2.5.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-devtools:jar:2.2.6.RELEASE:runtime (optional)
[INFO] | +- org.springframework.boot:spring-boot:jar:2.2.6.RELEASE:compile
[INFO] | \- org.springframework.boot:spring-boot-autoconfigure:jar:2.2.6.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-configuration-processor:jar:2.2.6.RELEASE:compile (optional)
[INFO] +- org.projectlombok:lombok:jar:1.18.12:compile (optional)
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.2.6.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:2.2.6.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.2.6.RELEASE:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.4.0:test
[INFO] | | \- net.minidev:json-smart:jar:2.3:test
[INFO] | | \- net.minidev:accessors-smart:jar:1.2:test
[INFO] | | \- org.ow2.asm:asm:jar:5.0.4:test
[INFO] | +- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3:runtime
[INFO] | | \- jakarta.activation:jakarta.activation-api:jar:1.2.2:runtime
[INFO] | +- org.junit.jupiter:junit-jupiter:jar:5.5.2:test
[INFO] | | +- org.junit.jupiter:junit-jupiter-params:jar:5.5.2:test
[INFO] | | \- org.junit.jupiter:junit-jupiter-engine:jar:5.5.2:test
[INFO] | | \- org.junit.platform:junit-platform-engine:jar:1.5.2:test
[INFO] | +- org.mockito:mockito-junit-jupiter:jar:3.1.0:test
[INFO] | +- org.assertj:assertj-core:jar:3.13.2:test
[INFO] | +- org.hamcrest:hamcrest:jar:2.1:test
[INFO] | +- org.mockito:mockito-core:jar:3.1.0:test
[INFO] | | +- net.bytebuddy:byte-buddy:jar:1.10.8:compile
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.10.8:test
[INFO] | | \- org.objenesis:objenesis:jar:2.6:test
[INFO] | +- org.skyscreamer:jsonassert:jar:1.5.0:test
[INFO] | | \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO] | +- org.springframework:spring-core:jar:5.2.5.RELEASE:compile
[INFO] | | \- org.springframework:spring-jcl:jar:5.2.5.RELEASE:compile
[INFO] | +- org.springframework:spring-test:jar:5.2.5.RELEASE:test
[INFO] | \- org.xmlunit:xmlunit-core:jar:2.6.4:test
[INFO] +- io.projectreactor:reactor-test:jar:3.3.4.RELEASE:test
[INFO] +- org.springframework.kafka:spring-kafka-test:jar:2.3.7.RELEASE:test
[INFO] | +- org.apache.kafka:kafka-clients:jar:test:2.3.1:test
[INFO] | +- org.apache.kafka:kafka-streams:jar:2.3.1:test
[INFO] | | +- org.apache.kafka:connect-json:jar:2.3.1:test
[INFO] | | | \- org.apache.kafka:connect-api:jar:2.3.1:test
[INFO] | | \- org.rocksdb:rocksdbjni:jar:5.18.3:test
[INFO] | +- org.apache.kafka:kafka-streams-test-utils:jar:2.3.1:test
[INFO] | +- org.apache.kafka:kafka_2.12:jar:2.3.1:test
[INFO] | | +- com.fasterxml.jackson.module:jackson-module-scala_2.12:jar:2.10.3:test
[INFO] | | | \- com.fasterxml.jackson.module:jackson-module-paranamer:jar:2.10.3:test
[INFO] | | | \- com.thoughtworks.paranamer:paranamer:jar:2.8:test
[INFO] | | +- com.fasterxml.jackson.dataformat:jackson-dataformat-csv:jar:2.10.3:test
[INFO] | | +- net.sf.jopt-simple:jopt-simple:jar:5.0.4:runtime
[INFO] | | +- com.yammer.metrics:metrics-core:jar:2.2.0:test
[INFO] | | +- org.scala-lang:scala-library:jar:2.12.8:test
[INFO] | | +- org.scala-lang:scala-reflect:jar:2.12.8:test
[INFO] | | +- com.typesafe.scala-logging:scala-logging_2.12:jar:3.9.0:test
[INFO] | | +- com.101tec:zkclient:jar:0.11:test
[INFO] | | \- org.apache.zookeeper:zookeeper:jar:3.4.14:test
[INFO] | | +- com.github.spotbugs:spotbugs-annotations:jar:3.1.9:test
[INFO] | | \- org.apache.yetus:audience-annotations:jar:0.5.0:test
[INFO] | +- org.apache.kafka:kafka_2.12:jar:test:2.3.1:test
[INFO] | \- org.junit.jupiter:junit-jupiter-api:jar:5.5.2:test
[INFO] | +- org.apiguardian:apiguardian-api:jar:1.1.0:test
[INFO] | +- org.opentest4j:opentest4j:jar:1.2.0:test
[INFO] | \- org.junit.platform:junit-platform-commons:jar:1.5.2:test
[INFO] +- io.github.stavshamir:swagger4kafka:jar:0.0.1:compile
[INFO] | +- io.swagger:swagger-inflector:jar:1.0.16:runtime
[INFO] | | +- io.swagger:swagger-jersey2-jaxrs:jar:1.5.21:runtime
[INFO] | | | \- io.swagger:swagger-jaxrs:jar:1.5.21:runtime
[INFO] | | | \- org.reflections:reflections:jar:0.9.11:runtime
[INFO] | | | \- org.javassist:javassist:jar:3.21.0-GA:runtime
[INFO] | | +- io.swagger:swagger-parser:jar:1.0.38:runtime
[INFO] | | | \- io.swagger:swagger-core:jar:1.5.21:runtime
[INFO] | | | +- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.10.3:runtime
[INFO] | | | \- javax.validation:validation-api:jar:2.0.1.Final:runtime
[INFO] | | +- org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.29.1:runtime
[INFO] | | | +- org.glassfish.hk2.external:jakarta.inject:jar:2.6.1:runtime
[INFO] | | | +- org.glassfish.jersey.core:jersey-common:jar:2.29.1:runtime
[INFO] | | | | \- org.glassfish.hk2:osgi-resource-locator:jar:1.0.3:runtime
[INFO] | | | +- org.glassfish.jersey.core:jersey-server:jar:2.29.1:runtime
[INFO] | | | | \- org.glassfish.jersey.media:jersey-media-jaxb:jar:2.29.1:runtime
[INFO] | | | \- jakarta.ws.rs:jakarta.ws.rs-api:jar:2.1.6:runtime
[INFO] | | +- org.glassfish.jersey.media:jersey-media-multipart:jar:2.29.1:runtime
[INFO] | | | \- org.jvnet.mimepull:mimepull:jar:1.9.13:runtime
[INFO] | | +- org.glassfish.jersey.core:jersey-client:jar:2.29.1:runtime
[INFO] | | +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] | | +- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] | | +- org.slf4j:slf4j-ext:jar:1.7.30:runtime
[INFO] | | +- commons-lang:commons-lang:jar:2.4:runtime
[INFO] | | +- org.apache.commons:commons-csv:jar:1.1:runtime
[INFO] | | +- commons-io:commons-io:jar:2.5:runtime
[INFO] | | +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.10.3:runtime
[INFO] | | | +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.10.3:runtime
[INFO] | | | \- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.10.3:runtime
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-joda:jar:2.10.3:runtime
[INFO] | | | \- joda-time:joda-time:jar:2.10.5:runtime
[INFO] | | +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-xml-provider:jar:2.10.3:runtime
[INFO] | | | +- com.fasterxml.jackson.dataformat:jackson-dataformat-xml:jar:2.10.3:runtime
[INFO] | | | +- org.codehaus.woodstox:stax2-api:jar:4.2:runtime
[INFO] | | | \- com.fasterxml.woodstox:woodstox-core:jar:6.0.1:runtime
[INFO] | | +- com.github.java-json-tools:json-schema-validator:jar:2.2.8:runtime
[INFO] | | | +- com.github.java-json-tools:json-schema-core:jar:1.2.8:runtime
[INFO] | | | | +- org.mozilla:rhino:jar:1.7R4:runtime
[INFO] | | | | +- com.github.fge:jackson-coreutils:jar:1.8:runtime
[INFO] | | | | | \- com.github.fge:msg-simple:jar:1.1:runtime
[INFO] | | | | | \- com.github.fge:btf:jar:1.2:runtime
[INFO] | | | | \- com.github.fge:uri-template:jar:0.9:runtime
[INFO] | | | +- javax.mail:mailapi:jar:1.4.3:runtime
[INFO] | | | | \- javax.activation:activation:jar:1.1:runtime
[INFO] | | | \- com.googlecode.libphonenumber:libphonenumber:jar:8.0.0:runtime
[INFO] | | +- commons-fileupload:commons-fileupload:jar:1.3.1:runtime
[INFO] | | \- org.apache.commons:commons-lang3:jar:3.9:runtime
[INFO] | +- org.springframework.boot:spring-boot-starter-web:jar:2.2.6.RELEASE:runtime
[INFO] | | +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.2.6.RELEASE:runtime
[INFO] | | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:9.0.33:runtime
[INFO] | | | +- org.apache.tomcat.embed:tomcat-embed-el:jar:9.0.33:runtime
[INFO] | | | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:9.0.33:runtime
[INFO] | | \- org.springframework:spring-webmvc:jar:5.2.5.RELEASE:runtime
[INFO] | +- com.google.guava:guava:jar:27.0.1-jre:runtime
[INFO] | | +- com.google.guava:failureaccess:jar:1.0.1:runtime
[INFO] | | +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:runtime
[INFO] | | +- com.google.code.findbugs:jsr305:jar:3.0.2:runtime
[INFO] | | +- org.checkerframework:checker-qual:jar:2.5.2:runtime
[INFO] | | +- com.google.errorprone:error_prone_annotations:jar:2.2.0:runtime
[INFO] | | +- com.google.j2objc:j2objc-annotations:jar:1.1:runtime
[INFO] | | \- org.codehaus.mojo:animal-sniffer-annotations:jar:1.17:runtime
[INFO] | \- com.fasterxml.jackson.core:jackson-databind:jar:2.10.3:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-core:jar:2.10.3:compile
[INFO] \- io.github.stavshamir:swagger4kafka-ui:jar:0.0.1:compile
now i have this exception
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-05-20 11:59:59.311 ERROR 17416 --- [ restartedMain] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.reactive.config.DelegatingWebFluxConfiguration': Initialization of bean failed; nested exception is java.lang.IllegalStateException: The Java/XML config for Spring MVC and Spring WebFlux cannot both be enabled, e.g. via @EnableWebMvc and @EnableWebFlux, in the same application.
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:603) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:882) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
at com.example.demo.DemoApplication.main(DemoApplication.java:15) [classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_201]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_201]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_201]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_201]
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-2.2.6.RELEASE.jar:2.2.6.RELEASE]
Caused by: java.lang.IllegalStateException: The Java/XML config for Spring MVC and Spring WebFlux cannot both be enabled, e.g. via @EnableWebMvc and @EnableWebFlux, in the same application.
at org.springframework.util.Assert.state(Assert.java:73) ~[spring-core-5.2.5.RELEASE.jar:5.2.5.RELEASE]
at org.springframework.web.reactive.config.WebFluxConfigurationSupport.setApplicationContext(WebFluxConfigurationSupport.java:105) ~[spring-webflux-5.2.5.RELEASE.jar:5.2.5.RELEASE]
at org.springframework.context.support.ApplicationContextAwareProcessor.invokeAwareInterfaces(ApplicationContextAwareProcessor.java:123) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:100) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:416) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1788) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
... 20 common frames omitted
Process finished with exit code 1
I think I will remove the springfox dependency in the next version which will solve this problem hopefully. Thanks for reporting the issue, I will fix it in a few days.
thanks @stavshamir , you built an excellent tool, I hope I can use it with version 3 of springfox.
Thanks for the kind words! I remove the springfox dependencies. Now this project depends only on io.swagger which should be compatible with any springfox version. Please try updating to 0.0.2 and let me know if it works:
<dependency>
<groupId>io.github.stavshamir</groupId>
<artifactId>swagger4kafka</artifactId>
<version>0.0.2</version>
</dependency>
the pom refers to "spring-boot-starter-web" but I use "spring-boot-starter-webflux" these dependencies cause problems together, try making an exclusion but throw an exception "Unable to start Netty"
@cxrdevx I replaced the spring-boot-starter-web
dependency with the more minimal spring-web
dependency, which I have seen is being used in webflux as well. So now I hope it all works out.
Please try again with version 0.0.3 and let me know if it works!
@cxrdevx Can I assume that it now works?
Thanks! yes works fine.
Hi,
I just added the dependencies in a project with spring webflux, and I ran into the following error