From a1de2db9884141fdb7886555bcb529cf644d40cf Mon Sep 17 00:00:00 2001 From: leebj Date: Tue, 24 Sep 2024 13:13:47 +0900 Subject: [PATCH] =?UTF-8?q?=EB=8D=B0=EC=9D=B4=ED=84=B0=EB=B2=A0=EC=9D=B4?= =?UTF-8?q?=EC=8A=A4=20=EC=84=A4=EC=A0=95=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cokr/xit/fims/DatabaseConfig.java | 34 +++++++++++++++++++ .../xit/fims/SpringBootApplicationBridge.java | 18 ++++++++++ 2 files changed, 52 insertions(+) create mode 100644 src/main/java/cokr/xit/fims/DatabaseConfig.java create mode 100644 src/main/java/cokr/xit/fims/SpringBootApplicationBridge.java 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 { + +}