Olá, pessoal.
Alguém poderia me tirar uma dúvida. Criei uma api no springboot 3.0, estou tentando subir ela para rodar no swagger, mas infilizmente não estou conseguindo descobrir o erro. Já seguir todos os tutoriais possíves rsr , mas até agora, mada, se alguém puder ajudar eu agradesço.
Dependencias instaladas:
<!-- SWAGGER -->
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>1.7.0</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-boot-starter</artifactId>
<version>3.0.0</version>
</dependency>
swagger config
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
@Configuration
@EnableSwagger2
public class swaggerConfig extends WebMvcConfigurationSupport {
@Bean
public Docket api(){
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.any())
.paths(PathSelectors.any())
.build()
.apiInfo(apiInfo());
}
private ApiInfo apiInfo() {
return new ApiInfoBuilder()
.title("Teste CGTIC")
.description("API para controlar solicitações de atendimento da atic/pfmos")
.version("3.0.1")
.build();
}
}
Os log de erro :
: Initializing Spring DispatcherServlet 'dispatcherServlet'
2023-09-11T13:55:25.797-03:00 INFO 16264 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2023-09-11T13:55:25.798-03:00 DEBUG 16264 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Detected StandardServletMultipartResolver
2023-09-11T13:55:25.798-03:00 DEBUG 16264 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Detected AcceptHeaderLocaleResolver
2023-09-11T13:55:25.799-03:00 DEBUG 16264 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Detected FixedThemeResolver
2023-09-11T13:55:25.801-03:00 DEBUG 16264 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Detected org.springframework.web.servlet.view.DefaultRequestToViewNameTranslator@5e724ed9
2023-09-11T13:55:25.802-03:00 DEBUG 16264 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Detected org.springframework.web.servlet.support.SessionFlashMapManager@fc05197
2023-09-11T13:55:25.802-03:00 DEBUG 16264 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : enableLoggingRequestDetails='false': request parameters and headers will be masked to prevent unsafe logging of potentially sensitive data
2023-09-11T13:55:25.802-03:00 INFO 16264 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 4 ms
2023-09-11T13:55:25.822-03:00 DEBUG 16264 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : GET "/swagger-ui.html", parameters={}
2023-09-11T13:55:25.871-03:00 DEBUG 16264 --- [nio-8080-exec-1] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped to ResourceHttpRequestHandler [classpath [META-INF/resources/], classpath [resources/], classpath [static/], classpath [public/], ServletContext [/]]
2023-09-11T13:55:25.899-03:00 DEBUG 16264 --- [nio-8080-exec-1] o.s.w.s.r.ResourceHttpRequestHandler : Resource not found
2023-09-11T13:55:25.907-03:00 DEBUG 16264 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed 404 NOT_FOUND
2023-09-11T13:55:25.917-03:00 DEBUG 16264 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : "ERROR" dispatch for GET "/error", parameters={}
2023-09-11T13:55:25.922-03:00 DEBUG 16264 --- [nio-8080-exec-1] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped to org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController#errorHtml(HttpServletRequest, HttpServletResponse)
2023-09-11T13:55:25.979-03:00 DEBUG 16264 --- [nio-8080-exec-1] o.s.w.s.v.ContentNegotiatingViewResolver : Selected 'text/html' given [text/html, text/html;q=0.8]
2023-09-11T13:55:25.986-03:00 DEBUG 16264 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Exiting from "ERROR" dispatch, status 404