0
我當前的項目是基於Spring 3.0.6.RELEASE(Spring rest)的maven,我試圖將swagger與我的項目集成,但我面臨依賴性問題,也沒有找到足夠的來自swagger網站的文檔。集成Swagger和Spring 3.0.6.RELEASE
我在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>
能否請您在尋找整合招搖正確的依賴與Spring 3.0.6.RELEASE爲獲得例外低於在部署戰成服務器別人的幫助。
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)
注:我們有春天4.X版本,但不是在春天3.0.6版本良好的文檔。
您面臨的問題是什麼? – KayV
請更新您的問題,並添加完整的異常stacktrace那裏,並刪除以上評論.. – KayV
嗨凱,異常更新問題,請檢查。 – Raju