我当前的项目是基于Spring 3.0.6.RELEASE(Spring rest)的maven,我正在尝试将swagger与我的项目集成,但我面临依赖性问题,也没有从swagger网站找到足够的文档。
我在pom.xml文件中使用了以下依赖项。
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>3.0.6.RELEASE</version>
</dependency>
<dependency>
<groupId>com.mangofactory</groupId>
<artifactId>swagger-springmvc</artifactId>
<version>0.5.2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>[${jackson.databind-version}]</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-jaxb-annotations</artifactId>
<version>[${jackson.databind-version}]</version>
</dependency>
请问有人帮助找到正确的集成swagger依赖项,将Spring 3.0.6.RELEASE作为低于异常的同时将war部署到服务器中。
org.apache.catalina.core.StandardContext listenerStart SEVERE:
Exception sending context initialized event to listener instance of class
org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'documentationController': Injection of
autowired dependencies failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Could not
autowire field: private
SEVERE: Context initialization failedjava.lang.NoClassDefFoundError:
org/springframework/web/bind/support/WebDataBinderFactory at
java.lang.Class.getDeclaredMethods0(Native Method) at
java.lang.Class.privateGetDeclaredMethods(Unknown Source) at
java.lang.Class.getDeclaredMethods(Unknown Source) at
org.springframework.core.type.StandardAnnotationMetadata.has
AnnotatedMethods(StandardAnnotationMetadata.java:136)
注意:我们有关于Spring 4.X版本的良好文档,但在Spring 3.0.6版本上没有。