title: Spring boot Swagger UI exception at startup
body: <p>I'm trying to get Swagger UI to work in my project and I'm following <a href="https://springdoc.org/#Introduction" rel="nofollow noreferrer">these docs</a>, but whatever I try my application instantly crashes with the following exception:</p>
  <pre><code>Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'securityConfig': Unsatisfied dependency expressed through method 'setContentNegotationStrategy' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration': Unsatisfied dependency expressed through method 'setConfigurers' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'swaggerWebMvcConfigurer' defined in class path resource [org/springdoc/webmvc/ui/SwaggerConfig.class]: Unsatisfied dependency expressed through method 'swaggerWebMvcConfigurer' parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'indexPageTransformer' defined in class path resource [org/springdoc/webmvc/ui/SwaggerConfig.class]: Unsatisfied dependency expressed through method 'indexPageTransformer' parameter 3; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'swaggerWelcome' defined in class path resource [org/springdoc/webmvc/ui/SwaggerConfig.class]: Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [org.springdoc.webmvc.ui.SwaggerWelcomeWebMvc] from ClassLoader [jdk.internal.loader.ClassLoaders$AppClassLoader@251a69d7]
  </code></pre>
  <p>I'm using Kotlin with Spring Boot and these are my Gradle dependencies:</p>
  <pre class="lang-kotlin prettyprint-override"><code>implementation(&quot;org.springframework.boot:spring-boot-starter-web&quot;)
  implementation(&quot;org.springframework.boot:spring-boot-starter-jooq&quot;)
  implementation(&quot;org.springframework.boot:spring-boot-starter-security&quot;)
  implementation(&quot;org.springframework.boot:spring-boot-configuration-processor&quot;)
  implementation(&quot;org.springframework.boot:spring-boot-starter-validation&quot;)
  implementation(&quot;org.springframework.boot:spring-boot-starter-log4j2&quot;)
  implementation(&quot;com.braintreepayments.gateway:braintree-java:3.14.0&quot;)
  implementation(&quot;com.fasterxml.jackson.module:jackson-module-kotlin:2.13.1&quot;)
  implementation(&quot;com.fasterxml.jackson.core:jackson-databind:2.13.2&quot;)
  implementation(&quot;com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.13.2&quot;)
  implementation(&quot;org.apache.logging.log4j:log4j-layout-template-json&quot;)
  implementation(&quot;org.springdoc:springdoc-openapi-kotlin:1.6.6&quot;)
  implementation(&quot;org.springdoc:springdoc-openapi-ui:1.6.6&quot;)
  implementation(&quot;org.jooq:jooq-meta&quot;)
  implementation(&quot;org.jooq:jooq-kotlin&quot;)
  implementation(&quot;org.jooq:jooq-codegen&quot;)
  implementation(&quot;org.jooq:jooq-codegen-maven&quot;)
  implementation(&quot;org.jooq:jooq-meta-extensions&quot;)
  implementation(&quot;org.jetbrains.kotlin:kotlin-reflect:1.6.10&quot;)
  implementation(&quot;org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10&quot;)
  implementation(&quot;com.zaxxer:HikariCP:5.0.1&quot;)
  implementation(&quot;com.github.ben-manes.caffeine:caffeine:3.0.5&quot;)
  implementation(&quot;org.flywaydb:flyway-core:8.5.4&quot;)
  implementation(&quot;org.postgresql:postgresql:42.3.3&quot;)
  </code></pre>
  <p>I've tried a lot of different packages in a lot of different combinations, but it will always throw an exception at startup.</p>
  <p>Plugins section of Gradle file:</p>
  <pre class="lang-kotlin prettyprint-override"><code>plugins {
      id(&quot;org.springframework.boot&quot;) version &quot;3.0.0-SNAPSHOT&quot;
      id(&quot;io.spring.dependency-management&quot;) version &quot;1.0.11.RELEASE&quot;
      id(&quot;org.flywaydb.flyway&quot;) version &quot;8.5.4&quot;
      id(&quot;nu.studer.jooq&quot;) version &quot;7.1.1&quot;
      kotlin(&quot;jvm&quot;) version &quot;1.6.20-RC&quot;
      kotlin(&quot;plugin.spring&quot;) version &quot;1.6.20-RC&quot;
  }
  </code></pre>