springdoc / springdoc-openapi-maven-plugin

Library for OpenAPI 3 with spring-boot
https://springdoc.org
Apache License 2.0
141 stars 37 forks source link

404 #14

Closed djdam closed 4 years ago

djdam commented 4 years ago

Hi, I used the maven config from the README but I get a 404 when the plugin tries to fetch the json. here 's a snippet of my CMD:

2020-07-30 14:33:51.008 INFO 13344 --- [lication.main()] DeferredRepositoryInitializationListener : Triggering deferred initialization of Spring Data repositoriesà 2020-07-30 14:33:51.318 INFO 13344 --- [lication.main()] DeferredRepositoryInitializationListener : Spring Data repositories initialized! 2020-07-30 14:33:51.328 INFO 13344 --- [lication.main()] nl.kpnnetwerk.hbo.HboApplication : Started HboApplication in 3.651 seconds (JVM running for 14.689) [INFO] [INFO] --- springdoc-openapi-maven-plugin:1.0:generate (generate-openapi) @ hbo-boot --- 2020-07-30 14:33:52.016 INFO 13344 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet' 2020-07-30 14:33:52.016 INFO 13344 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet' 2020-07-30 14:33:52.021 INFO 13344 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 4 ms [ERROR] An error has occured: Response code 404 [INFO]

Any ideas? It seems that spring-boot:start returns too early, when the DispatcherServlet is not yet initialized

djdam commented 4 years ago

never mind, I found out the issue.. a misconfiguration :(

guilhermecgs commented 1 year ago

@djdam , what was the issue?

ErwanLeroux commented 2 months ago

I solved that problem by setting the maven logs to DEBUG and seeing that my configuration was not used.