MapperSuport, 기본 interceptor로 설정

master
mjkhan21 11 months ago
parent 0aa740f9f8
commit d6bf3ba680

@ -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);

Loading…
Cancel
Save