diff --git a/src/main/java/cokr/xit/fims/DatabaseConfig.java b/src/main/java/cokr/xit/fims/DatabaseConfig.java new file mode 100644 index 00000000..1fd47f91 --- /dev/null +++ b/src/main/java/cokr/xit/fims/DatabaseConfig.java @@ -0,0 +1,34 @@ +package cokr.xit.fims; + +import javax.sql.DataSource; + +import org.springframework.boot.context.properties.ConfigurationProperties; + +import cokr.xit.foundation.boot.DatasourceConfig; + +public class DatabaseConfig { + public static class FimsDatasource extends DatasourceConfig { + @Override + @ConfigurationProperties(prefix = "spring.datasource.hikari.fims") + public DataSource dataSource() { + return super.dataSource(); + } + + @Override + protected String[] mapperLocationPatterns() { + return new String[] { + "classpath*:sql/mapper-jar-applib/base/*.xml", + "classpath*:sql/mapper/base/*.xml", + "classpath*:sql/mapper/interfaces/*.xml", + "classpath*:sql/mapper/fims/**/*.xml", + }; + } + + @Override + protected String mapperBasePackages() { + return "cokr.xit.base;cokr.xit.interfaces;cokr.xit.fims"; + } + } + + +} diff --git a/src/main/java/cokr/xit/fims/SpringBootApplicationBridge.java b/src/main/java/cokr/xit/fims/SpringBootApplicationBridge.java new file mode 100644 index 00000000..b6e34cd3 --- /dev/null +++ b/src/main/java/cokr/xit/fims/SpringBootApplicationBridge.java @@ -0,0 +1,18 @@ +package cokr.xit.fims; + +import org.springframework.boot.autoconfigure.ImportAutoConfiguration; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.FilterType; + +import cokr.xit.base.boot.XitBaseApplication; +import cokr.xit.foundation.boot.DatasourceConfig; + +@ImportAutoConfiguration({ +DatabaseConfig.FimsDatasource.class +}) +@ComponentScan( +excludeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE,classes = {DatasourceConfig.class}) +) +public class SpringBootApplicationBridge extends XitBaseApplication { + +}