0
我試圖在Spring 3.1.2項目中使用swagger-springmvc 0.6.6。但是,當我將應用程序部署到Tomcat時,它會失敗並出現異常。如何使用Spring 3.1.2應用程序設置swagger-springmvc 0.6.5
我使用的版本似乎有問題。 swagger-springmvc也帶來了與Spring 3.1.2罐子相沖突的Spring 3.2.4罐子。
錯誤:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'org.springframework.security.filterChains': Cannot resolve reference to bean
'org.springframework.security.web.DefaultSecurityFilterChain#2'
while setting bean property 'sourceList' with key [2]; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'org.springframework.security.web.DefaultSecurityFilterChain#2
.......
....nested exception is java.lang.ClassNotFoundException:
org.springframework.cache.ehcache.EhCacheFactoryBean
的org.springframework.cache.ehcache.EhCacheFactoryBean
類兩種春3.1.2和Spring 3.2.4發現。
當我嘗試在我的本地運行應用程序smachine其運行沒有問題。
有人可以幫我解決這個問題嗎?
你或許應該指定要使用來構建你的項目是什麼工具:Maven的?蝕?別的東西?你也可以看看你的'WAR'(在'WEB-INF/lib'中)看看哪些庫被打包在那裏。實際上有兩個版本的Spring jar嗎? – Alexey
Alexey-感謝您的回覆。我正在用tomcat構建Ant .depoying.Yes有兩個版本的Spring。 Spring 3.1.2(應用程序使用)和spring 3.2.4(swagger-spingMvc使用)。當我在eclipse配置的tomcat中本地部署應用程序時,應用程序沒有任何問題。 – BARATH
@alexey - 感謝您的回覆。我正在用tomcat構建Ant .depoying.Yes有兩個版本的Spring。 Spring 3.1.2(應用程序使用)和spring 3.2.4(swagger-spingMvc使用)。當我在eclipse配置的tomcat中本地部署應用程序時,應用程序沒有任何問題。 – BARATH