강의

멘토링

커뮤니티

Inflearn Community Q&A

sweetlulu4862051's profile image
sweetlulu4862051

asked

Practical web development using Java Spring Boot

E02 lombok installation + Mybatis configuration + simple bulletin board API implementation

2강에 setMapperLocations 에 에러

Written on

·

788

0

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

spring-boot

Answer 1

1

songjava님의 프로필 이미지
songjava
Instructor

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

 

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

 

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

User Unknown님의 프로필 이미지
User Unknown
Questioner

감사합니다

sweetlulu4862051's profile image
sweetlulu4862051

asked

Ask a question