【发布时间】:2019-02-06 10:18:47
【问题描述】:
我部署了用eclipse在centos上构建了.war文件,然后将它部署在centos(Linux)上的tomcat 8.5上。它正在解决这个问题。但是,当我在 Windows 上部署相同的“.war”或使用 Eclipse 构建新的“.war”文件时,它在 Tomcat8.5 上不起作用,并且会引发 BeansInCreation 异常。具有相同的Java1.7和Tomcat8.5版本windows7。 该版本还在以前版本的 Windows 上运行(更新前) 并且在最新的代码中没有做任何大的改动。
以下是来自 localhost 的日志:
Caused by: org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name '': Bean with name '' has been injected into other beans ['','',''] in its raw version as part of a circular reference, but has eventually been wrapped (for example as part of auto-proxy creation). This means that said other beans do not use the final version of the bean. This is often the result of over-eager type matching - consider using 'getBeanNamesOfType' with the 'allowEagerInit' flag turned off, for example.
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:485)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:170)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:268)
... 98 more
我认为问题可能是因为“大文件路径”,因为 Linux 支持比 Windows 更多的大文件路径。我在 regedit 中也进行了更改以支持,但这不需要更改。
【问题讨论】:
标签: java spring windows tomcat centos