• 카테고리

    질문 & 답변
  • 세부 분야

    백엔드

  • 해결 여부

    미해결

2강에 setMapperLocations 에 에러

22.03.15 15:13 작성 조회수 517

0

The method setMapperLocations(Resource[]) in the type SqlSessionFactoryBean is not applicable for the arguments (Resource); 는 어떻게 해결 하나요?

답변 1

답변을 작성해보세요.

1

import org.springframework.core.io.support.PathMatchingResourcePatternResolver;

 

factory.setMapperLocations(new PathMatchingResourcePatternResolver().getResources("classpath:mybatis/sql/*.xml"))

 

이렇게 사용하시면 오류가 해결되실거에요.

감사합니다