2016-12-05 95 views
0

我收到以下错误:Bean属性'trustStore'不可写或具有无效的setter方法。 setter的参数类型是否与getter的返回类型相匹配?

... 
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'trustStore' of bean class [it.gvb.arch.connector.http.HttpClientBuilderFactory]: Bean property 'trustStore' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter? 
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:1076) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE] 
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:927) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE] 
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:95) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE] 
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:75) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE] 
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1510) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE] 

我需要在我的应用程序上下文加载信任,广告我试图以同样的方式在春Documentation解释,所以我配置我的豆是这样的:

<bean id="secTrustStore" class="org.springframework.ws.soap.security.support.KeyStoreFactoryBean"> 
    <property name="password" value="${http.truststore.password:#{null}}"/> 
    <property name="location" value="${http.truststore.location:#{null}}"/> 
    <property name="type" value="${http.truststore.type:pkcs12}"/> 
</bean> 

任何有关我在做什么错误的建议?

回答

3

的问题不是Spring的KeyStoreFactoryBean,问题是,你HttpClientBuilderFactory类不具有trustStore财产或缺少二传手。仔细检查课程。

相关问题