我正在尝试在 Spring 3.1.2 项目中使用 swagger-springmvc 0.6.6。但是当我将应用程序部署到 Tomcat 时,它失败并出现异常。
我使用的版本似乎有问题。swagger-springmvc 还引入了与 Spring 3.1.2 jar 冲突的 Spring 3.2.4 jar。
错误:
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
在 Spring 3.1.2 和 Spring 3.2.4 中都可以找到。
当我尝试在我的本地 smachine 中运行该应用程序时,它的运行没有问题。
有人可以帮我解决这个问题吗?