강의

멘토링

커뮤니티

Inflearn コミュニティ Q&A

sweetlulu4862051 のプロフィール画像
sweetlulu4862051

投稿した質問数

Javaスプリングブート活用Web開発実務用

E02 lombokインストール+ Mybatis設定+簡単な掲示板Apiの実装

2강에 setMapperLocations 에 에러

作成

·

795

0

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

spring-boot

回答 1

1

songjava님의 프로필 이미지
songjava
インストラクター

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

 

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

 

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

User Unknown님의 프로필 이미지
User Unknown
質問者

감사합니다

sweetlulu4862051 のプロフィール画像
sweetlulu4862051

投稿した質問数

質問する