Just learning how maven and spring boot works so i've been practicing a little bit by doing simple projects. But i've run into an issue of my swagger-ui.html giving me an error of 404 not found.
What i've added in my pom.xml for swagger-ui.
`
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.0.0-M4</version>
</dependency>
`
My entire project code is available here
Doing little bit of google search I found some solutions that haven't helped me with my project yet.
Things i've added :
@EnableMvc @Configuration
in my main controller class. After adding these two annotations, my error displayed a different error. Pasting below :
Error creating bean with name 'org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration': Unsatisfied dependency expressed through method 'setConfigurers' parameter 0;
I've also tried added numerous other dependencies like
`
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-boot-starter</artifactId>
<version>3.0.0</version>
</dependency>
`
Any help would be greatly appreciated!
CodePudding user response:
Is your jdk version 17 because I see that it is configured in your pom.xml
file
<properties>
<java.version>17</java.version>
</properties>
CodePudding user response:
springdoc-openapi-starter-webmvc-ui need springboot 3.0