|
|
@ -11,6 +11,7 @@ import org.springframework.context.annotation.Configuration;
|
|
|
|
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
|
|
|
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
|
|
|
|
|
|
|
|
|
|
|
import cokr.xit.foundation.Assert;
|
|
|
|
import cokr.xit.foundation.Assert;
|
|
|
|
|
|
|
|
import cokr.xit.foundation.data.paging.MapperSupport;
|
|
|
|
|
|
|
|
|
|
|
|
/**데이터베이스 접속 관련 설정
|
|
|
|
/**데이터베이스 접속 관련 설정
|
|
|
|
* <ul><li>{@link #dataSource() 데이터소스} 설정</li>
|
|
|
|
* <ul><li>{@link #dataSource() 데이터소스} 설정</li>
|
|
|
@ -55,6 +56,7 @@ public class DatasourceConfig {
|
|
|
|
PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
|
|
|
|
PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
|
|
|
|
bean.setConfigLocation(resolver.getResource("classpath:sql/mybatis-config.xml"));
|
|
|
|
bean.setConfigLocation(resolver.getResource("classpath:sql/mybatis-config.xml"));
|
|
|
|
bean.setMapperLocations(resolver.getResources("classpath:sql/mapper/**/*.xml"));
|
|
|
|
bean.setMapperLocations(resolver.getResources("classpath:sql/mapper/**/*.xml"));
|
|
|
|
|
|
|
|
bean.setPlugins(new MapperSupport());
|
|
|
|
return bean;
|
|
|
|
return bean;
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|
throw Assert.runtimeException(e);
|
|
|
|
throw Assert.runtimeException(e);
|
|
|
|