inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

이야기를 나눠요

173만명의 커뮤니티!! 함께 토론해봐요.

주의! MyBatis에서 xml에 insert 사용 시 returnType이 없다.

스프링 DB 2편 - 데이터 접근 활용 기술

인터페이스 ItemRepository와 ItemMapper가 같은 줄 알고 복붙했다가 참사.. ㅠㅠ @Mapper public interface ItemMapper { Item save(Item item); void update(@Param("id") Long itemId, @Param("updateParam") ItemUpdateDto updateParam); Optional<Item> findById(Long id); List<Item> findAll(ItemSearchCond cond); } MyBatis에서 xml에 insert 사용 시 returnType 속성이 없는데 ItemMapper에서 Item을 리턴하여 에러 발생 Mapper method 'hello.itemservice.repository.mybatis.ItemMapper.save' has an unsupported return type: class hello.itemservice.domain.Item org.apache.ibatis.binding.BindingException: Mapper method 'hello.itemservice.repository.mybatis.ItemMapper.save' has an unsupported return type: class hello.itemservice.domain.Item

  • mybatis
데스나이트 댓글 1 좋아요 0 조회수 2087

인기 태그

인프런 TOP Writers

주간 인기글