gpt4 book ai didi

java - 没有这样的字段错误: NULL Spring Error

转载 作者:行者123 更新时间:2023-12-01 13:05:15 24 4
gpt4 key购买 nike

我已经在 xml 文件中配置了 Spring bean,但是当我运行我的应用程序时,出现以下错误。谁能告诉我为什么?

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ultra-config' defined in file [C:\src\test\resources\conf\ultra-root.xml]: Initialization of bean failed; nested exception is java.lang.NoSuchFieldError: NULL at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:529)

配置:

<bean id="http-8280" class="org.adroitlogic.ultraesb.transport.http.HttpNIOListener">
<constructor-arg ref="fileCache"/>
<property name="port" value="8280"/>
</bean>

<bean id="http-sender" class="org.adroitlogic.ultraesb.transport.http.HttpNIOSender">
<constructor-arg ref="fileCache"/>
</bean>

<bean id="environment" class="org.adroitlogic.ultraesb.api.Environment">
<constructor-arg value="unit_test" type="java.lang.String"/>
<property name="deploymentUnitsEnabled" value="true"/>
</bean>

<bean id="ultra-config" class="org.adroitlogic.ultraesb.core.ConfigurationImpl">
<property name="environment" ref="environment"/>
</bean>

Gradle 依赖

dependencies {
testCompile group: 'org.mockito', name: 'mockito-all', version: '1.9.5'
testCompile group: 'org.apache.maven.plugins', name: 'maven-failsafe-plugin', version: '2.16'
testCompile group: 'junit', name: 'junit', version:'4.9'
testCompile group: 'org.adroitlogic', name: 'ultraesb-sample', version:'2.2.0-SNAPSHOT'
compile group: 'org.adroitlogic', name: 'ultraesb-api', version:'2.2.0-SNAPSHOT'
compile group: 'org.adroitlogic', name: 'logging-api', version:'1.0.0-SNAPSHOT'
compile group: 'org.adroitlogic', name: 'logging-slf4j-impl', version:'1.0.0-SNAPSHOT'
compile(group: 'org.springframework.security', name: 'spring-security-core', version:'3.1.4.RELEASE') {
exclude(module: 'spring-core')
exclude(module: 'spring-context')
exclude(module: 'spring-beans')
}
}

最佳答案

关于java - 没有这样的字段错误: NULL Spring Error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23312328/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com