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

[Question] Error: Spring application did not start before the configured timeout #2

Closed aanno2 closed 4 years ago

aanno2 commented 4 years ago

Trying to use the plugin for integration tests like documented, but I always get 'Spring application did not start before the configured timeout'. However, spring server app is saying:

18:30:14.442 [http-nio-8080-exec-1] INFO  o.s.web.servlet.DispatcherServlet.initServletBean - Initializing Servlet 'dispatcherServlet'
18:30:14.446 [http-nio-8080-exec-1] INFO  o.s.web.servlet.DispatcherServlet.initServletBean - Completed initialization in 4 ms
18:30:21.918 [http-nio-8080-exec-2] WARN  o.s.w.s.m.s.DefaultHandlerExceptionResolver.logException - Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported]
18:31:05.899 [http-nio-8080-exec-3] WARN  o.s.w.s.m.s.DefaultHandlerExceptionResolver.logException - Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported]

Because of this, I guess that the plugin simply has not found out that the app already has started.

This is my question: How does the plugin try to find out if the application has started? JMX/RMI? Which port? Which MBean?

ghost commented 4 years ago

Make sure your application has started with the property spring.application.admin.enabled = true.

If Spring Boot Admin is not enabled, then it does not create the Admin mbean. Look at the conditions on the SpringApplicationAdminJmxAutoConfiguration class

springdoc commented 4 years ago

Hi @a-mantha ,

Thank you for your feedback. The documentation has been updated.