스프링 응용 프로그램 용 통합 테스트 스크립트를 개발하는 중입니다. 개미에서 테스트를 실행하면 다음과 같은 오류 메시지가 나타납니다. 이상적인 이유는 무엇입니까?스프링 통합 테스트 : 형식 오류 값을 변환 할 수 없습니다.
테스트 케이스는 :
testgetDefaultItemForStoreWithInvalidStoreId(com.xyz.business.admin.role.RoleUtilityUnitTest):
Caused an ERROR Error creating bean with name 'groundingService' defined in URL
[file:/C:/workspace/_EACE1_0_06/EB_Ace_Vob/Business/build/classess/businessContext.xml]: Error
setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested
PropertyAccessExceptions (1) are: PropertyAccessException 1: org.springframework.beans.TypeMismatchException:
Failed to convert property value of type [$Proxy47] to required type
[com.xyz.business.grounding.service.OdometerPdfStatement] for property 'odometerPdfStatement'; nested exception
is java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy47] to required type
[com.xyz.business.grounding.service.OdometerPdfStatement] for property 'odometerPdfStatement': no matching editors or
conversion strategy found org.springframework.beans.factory.BeanCreationException: Error creating bean with
name 'groundingService' defined in
URL [file:/C:/workspace/_EACE1_0_06/EB_Ace_Vob/Business/build/classess/businessContext.xml]: Error
setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested
PropertyAccessExceptions (1) are: PropertyAccessException 1: org.springframework.beans.TypeMismatchException:
Failed to convert property value of type [$Proxy47] to required type
[com.xyz.business.grounding.service.OdometerPdfStatement] for property 'odometerPdfStatement';
nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy47] to
required type [com.xyz.business.grounding.service.OdometerPdfStatement] for property 'odometerPdfStatement':
no matching editors or conversion strategy found Caused by:
org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessException details (1) are:
PropertyAccessException 1:
OdometerPDFStatement는 클래스 (안 인터페이스)
나는 다음이 있습니다 : 당신이에 CGLIB 항아리를 추가 할 필요가 같은
<bean id="odometerPdfStatement" class="com.xyz.business.grounding.service.OdometerPdfStatement"/>
<bean id="groundingService" class="com.xyz.business.grounding.service.GroundingServiceImpl">
<property name="groundingInformationManager" ref="groundingInformationManager"/>
<property name="codeManager" ref="codeManager"/>
<property name="userManager" ref="userManager"/>
<property name="configurator" ref="groundingConfigurator"/>
<property name="velocityPropertyFilePath" value="velocity.properties"/>
<property name="velocityTemplate" value="OdometerStatement.vm"/>
<property name="odometerStatementXSLResourceFile" value="classpath:OdometerStatement2xsl-fo.xsl"/>
<property name="imagePropertyFile" value="classpath:images.properties"/>
<property name="odometerPdfStatement" ref="odometerPdfStatement"/>
<property name="inspectionInformationManager" ref="inspectionInformationManager"/>
<property name="saleEventManager" ref="saleEventManager"/>
<property name="vehicleHistoryManager" ref="vehicleHistoryManager"/>
</bean>
어디서나 AOP를 사용하고 있습니까? "$ Proxy47"의심 스럽네요. –
boyd4715 : 그렇습니다. 우리는 AOP를 가지고 있습니다 - 개미를 테스트하는 방법에 차이가 있습니까? – boyd4715