Hello,
we’re trying to integrate Springfox (http://springfox.github.io/springfox) in our Cuba projects, to generate RESTful documentation according to OpenAPI specification; our final objective is to generate a swagger.json to import in a Swagger environment (like WSO2 Api Manager).
Unfortunately, after lots of attempts, we’re stucked in this error at startup:
12:57:26.674 ERROR c.h.c.c.s.AbstractWebAppContextLoader - Error initializing application
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'documentationPluginsBootstrapper' defined in URL [jar:file:/D:/
workspace/test/rest-swagger-test/deploy/tomcat/shared/lib/springfox-spring-web-2.7.0.jar!/springfox/documentation/spring/web/plugins/DocumentationPluginsBootstr
apper.class]: Unsatisfied dependency expressed through constructor parameter 6; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionExcept
ion: No qualifying bean of type 'javax.servlet.ServletContext' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations
: {}
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749) ~[spring-beans-4.3.10.RELEASE.jar:4.3
.10.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:189) ~[spring-beans-4.3.10.RELEASE.jar:4.3
.10.RELEASE]
…
In attach to this post, a zip file with a sample (not working) project.
Could you please tell us where we’re wrong or provide a working example?
Thanks in advance for your support,
Regards,
Paolo
rest-swagger-test.zip (86.5 KB)