【发布时间】:2018-08-28 18:28:31
【问题描述】:
我设法在 Spring Boot 应用程序上应用了 swagger ui,并且能够使用 http://localhost:8181/swagger-ui.html 打开页面
一段时间后,我继续处理我的应用程序,现在它消失了。我没有删除任何罐子。我添加了一个 Application Startup 类,当我在 Wildfly 10 上部署时,它用于在启动时加载一些东西。
即使我尝试将它作为 Spring Boot 应用程序与 tomcat 一起运行,它也不起作用。我不确定我改变了什么,这突然停止了。
我可以打开 /swagger-resources/configuration/ui 和 /swagger-resources/configuration/security 和 /swagger/api-docs (我把 springfox.documenation.swagger.v2.path 作为 /myapp/swagger/api -文档)
当我击球时
我在日志中得到了这个
2018-03-20 13:01:22.130 DEBUG 9928 --- [0.1-8181-exec-5] o.s.web.servlet.DispatcherServlet : DispatcherServlet with name 'dispatcherServlet' processing GET request for [/swagger-ui.html]
2018-03-20 13:01:22.131 DEBUG 9928 --- [0.1-8181-exec-5] s.w.s.m.m.a.RequestMappingHandlerMapping : Looking up handler method for path /swagger-ui.html
2018-03-20 13:01:22.131 DEBUG 9928 --- [0.1-8181-exec-5] .m.m.a.ExceptionHandlerExceptionResolver : Resolving exception from handler [null]: org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representation
2018-03-20 13:01:22.131 DEBUG 9928 --- [0.1-8181-exec-5] .w.s.m.a.ResponseStatusExceptionResolver : Resolving exception from handler [null]: org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representation
2018-03-20 13:01:22.132 DEBUG 9928 --- [0.1-8181-exec-5] .w.s.m.s.DefaultHandlerExceptionResolver : Resolving exception from handler [null]: org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representation
2018-03-20 13:01:22.132 DEBUG 9928 --- [0.1-8181-exec-5] o.s.web.servlet.DispatcherServlet : Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
2018-03-20 13:01:22.132 DEBUG 9928 --- [0.1-8181-exec-5] o.s.web.servlet.DispatcherServlet : Successfully completed request
【问题讨论】:
标签: java spring spring-boot swagger