java.lang.NoSuchMethodError: org.springframework.core.convert.support.DefaultConversionService.getSharedInstance()Lorg/springframework/core/convert/ConversionService; 해결방법

CODEDRAGON Development/Spring

반응형

  

오류메시지

java.lang.NoSuchMethodError: org.springframework.core.convert.support.DefaultConversionService.getSharedInstance()Lorg
/springframework/core/convert/ConversionService;


 

 

BDao.java:136

ArrayList<BDto> dtos = null;

String query = "SELECT bId, bName, bTitle, bContent, bDate, bHit, bGroup, bStep, bIndent "

"FROM mvcboard ORDER BY bGroup DESC, bStep ASC";

dtos = (ArrayList<BDto>)template.query(querynewBeanPropertyRowMapper<BDto>(BDto.class));

 

 


오류원인

spring-jdbc 의 호환버전이 맞지 않아 발생합니다.

 

 


 

해결방법

spring-jdbc 라이브러리의 버전을 4.3.10.RELEASE에서 4.1.4.RELEASE으로 변경합니다.

 

변경 전

<dependency>

    <groupId>org.springframework</groupId>

    <artifactId>spring-jdbc</artifactId>

    <version>4.3.10.RELEASE</version>

</dependency>

변경 후

<dependency>

    <groupId>org.springframework</groupId>

    <artifactId>spring-jdbc</artifactId>

    <version>4.1.4.RELEASE</version>

</dependency>