봄 JUnit 테스트에서 hazelcast 인스턴스를 시작하려고합니다. 아래는 내가 @ContextConfiguration으로로드하려고하고있는 XML 구성은콩 클래스 [com.hazelcast.config.Config]의 'semaphoreConfigs'속성이 올바르지 않습니다.
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:hz="http://www.hazelcast.com/schema/spring"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.hazelcast.com/schema/spring
http://www.hazelcast.com/schema/spring/hazelcast-spring.xsd">
<context:annotation-config />
<hz:hazelcast id="instance">
<hz:config>
<hz:spring-aware />
<hz:group name="dev" password="password"/>
<hz:network port="5701" port-auto-increment="false">
<hz:join>
<hz:multicast enabled="false" />
<hz:tcp-ip enabled="true">
<hz:members>127.0.0.1</hz:members>
</hz:tcp-ip>
</hz:join>
</hz:network>
</hz:config>
</hz:hazelcast>
암이 아래 예외를 받고, 어떤 포인터가 도움이
org.springframework.beans.NotWritablePropertyException입니다 : 잘못된 속성 bean 클래스의 'semaphoreConfigs'[com.hazelcast.config.Config] : Bean 속성 'semaphoreConfigs'에 쓰기가 가능하지 않거나 유효하지 않은 설정 메소드가 있습니다. setter의 매개 변수 유형이 getter의 반환 유형과 일치합니까? org.springframework.beans.AbstractPropertyAccessor.setPropertyValues에서 org.springframework.beans.BeanWrapperImpl.setPropertyValue (BeanWrapperImpl.java:902) 에서 org.springframework.beans.BeanWrapperImpl.setPropertyValue (BeanWrapperImpl.java:1042) (AbstractPropertyAccessor에서 . 자바 : 75) org.springframework.beans.AbstractPropertyAccessor.setPropertyValues (AbstractPropertyAccessor.java:57) AT는
Hazelcast 버전은 무엇입니까? 어떤 Spring 버전입니까? 스프링 부트 또는 간단한 스프링 프레임 워크? – noctarius
이것은 일반적인 스프링 프레임 워크이며 Java 버전은 JDK 1.7입니다. Hazelcast는 3.8이고 Spring 버전은 3.2.4입니다. 나는 실제로 오래된 프로젝트를 수정하고 작동 시키려면 몇 가지 테스트를 작성하려고한다. –