2016-12-05 1 views
0

私は次のエラーを取得しています:、私は自分のアプリケーションのコンテキストでトラストストアをロードする必要がBeanプロパティ 'trustStore'に書き込みができないか、または無効なセッターメソッドがあります。 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を構成し、広告:

<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性質を持っていないか、セッターが欠落しているということです。クラスを再確認してください。

関連する問題