인프런 커뮤니티 질문&답변
2강에 setMapperLocations 에 에러
작성
·
803
0
The method setMapperLocations(Resource[]) in the type SqlSessionFactoryBean is not applicable for the arguments (Resource); 는 어떻게 해결 하나요?
퀴즈
What are the main advantages of managing common configuration values in a specific class (such as @GlobalConfig)?
Application performance improves dramatically
Easy management and modification of settings increases maintainability.
Configuration values can be retrieved without a DB connection.
The configuration difference between development and production environments completely disappears.
답변 1
1
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
factory.setMapperLocations(new PathMatchingResourcePatternResolver().getResources("classpath:mybatis/sql/*.xml"))
이렇게 사용하시면 오류가 해결되실거에요.





감사합니다