@@ -110,24 +124,34 @@ function fn_egov_link_page(pageNo){
- #set($linkParams="")
- #set($i=0)
- #foreach($attribute in $model.primaryKeys)
- #if($i == 0)
- #set($linkParams="")
- #else
- #set($linkParams="$linkParams, ")
- #end
- #set($i=$i+1)
- #end
-
- #foreach($attribute in $model.attributes)
- #if($attribute.primaryKey == true)
-
- #else
-
- #end
- #end
+ #if(${model.primaryKeys} == [])
+ #set($linkParams="''")
+ #foreach($attribute in $model.attributes)
+ #if($attribute.ccName == ${model.attributes.get(0).ccName})
+
+ #else
+
+ #end
+ #end
+ #else
+ #set($linkParams="")
+ #set($i=0)
+ #foreach($attribute in $model.primaryKeys)
+ #if($i == 0)
+ #set($linkParams="''")
+ #else
+ #set($linkParams="$linkParams, ''")
+ #end
+ #set($i=$i+1)
+ #end
+ #foreach($attribute in $model.attributes)
+ #if($attribute.primaryKey == true)
+
+ #else
+
+ #end
+ #end
+ #end
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/crud/jsp/pkg/egovSample2Register.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/crud/jsp/pkg/egovSample2Register.vm
index f3b2f47f9..35f19e298 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/crud/jsp/pkg/egovSample2Register.vm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/crud/jsp/pkg/egovSample2Register.vm
@@ -41,7 +41,13 @@
-
+
+#if(${model.primaryKeys} == [])
+
+#else
+
+#end
+
@@ -79,12 +85,12 @@ function fn_egov_save() {
-
+
-
+
@@ -96,6 +102,7 @@ function fn_egov_save() {
+#if(${model.primaryKeys} == [])
#foreach($attribute in $model.primaryKeys)
${attribute.name} *
@@ -103,9 +110,18 @@ function fn_egov_save() {
-#end
+#end
+#else
+
+ ${model.attributes.get(0).name} *
+
+
+
+
+#end
+#if(${model.primaryKeys} == [])
#foreach($attribute in $model.primaryKeys)
${attribute.name} *
@@ -113,9 +129,16 @@ function fn_egov_save() {
+#end
+#else
+
+ ${model.attributes.get(0).name} *
+
+
+
+
#end
-
#foreach($attribute in $model.attributes)
#if($attribute.primaryKey == false)
@@ -131,12 +154,12 @@ function fn_egov_save() {
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/crud/resource/pkg/EgovSample_Sample2_MAPPER.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/crud/resource/pkg/EgovSample_Sample2_MAPPER.vm
new file mode 100644
index 000000000..03aba844c
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/crud/resource/pkg/EgovSample_Sample2_MAPPER.vm
@@ -0,0 +1,317 @@
+##
+#set($voPackage="${voPackage}")
+#set($voClassName="${model.entity.pcName}VO")
+#set($defaultVoClassName="${model.entity.pcName}DefaultVO")
+#set($searchVOAlias="${model.entity.ccName}SerarchVO")
+#set($mapperPackage="${mapperPackage}")
+#set($mapperClassName="${model.entity.pcName}Mapper")
+#set($mapperName="${model.entity.ccName}Mapper")
+#set($mapperInstanceName="${model.entity.ccName}Mapper")
+##
+##
+#set($vender="$model.vender")
+#set($namespaceDAO="${model.entity.ccName}DAO")
+#set($namespaceMapper="${mapperPackage}.${mapperClassName}")
+#set($resultMapId="${model.entity.ccName}")
+#set($resultMapClass="${voPackage}.${voClassName}")
+##
+##
+#set($insertQueryId="insert${model.entity.pcName}")
+#set($updateQueryId="update${model.entity.pcName}")
+#set($deleteQueryId="delete${model.entity.pcName}")
+#set($selectQueryId="select${model.entity.pcName}")
+#set($selectListQueryId="select${model.entity.pcName}List")
+#set($selectListTotCntQueryId="select${model.entity.pcName}ListTotCnt")
+##
+##
+
+
+
+
+
+
+## --------------------------------------------------------------------------------------------------------
+
+## --------------------------------------------------------------------------------------------------------
+
+#set($i=0)
+#foreach($attribute in $model.attributes)
+#set($i=$i+1)
+
+#end
+
+
+## ##################################################################################################
+
+
+
+
+## ##################################################################################################
+
+
+
+
+## ##################################################################################################
+
+
+
+
+## ##################################################################################################
+
+
+
+
+## ##################################################################################################
+
+#if($vender == "HSQLDB")
+ SELECT
+ #set($i=0)
+ #foreach($attribute in $model.attributes)
+ #if($i == 0)
+ ${attribute.name}
+ #else
+ , ${attribute.name}
+ #end
+ #set($i=$i+1)
+ #end
+ FROM ${model.entity.name}
+ WHERE 1=1
+
+ AND
+ ${model.attributes.get(0).name} = #{searchKeyword}
+
+ AND
+ ${model.attributes.get(1).name} LIKE '%' || #{searchKeyword} || '%'
+
+
+ ORDER BY
+#if(!${model.primaryKeys} == [])
+ ${model.attributes.get(0).name} DESC
+#else
+ #set($i=0)
+ #foreach($attribute in $model.primaryKeys)
+ #if($i == 0)
+ ${attribute.name} DESC
+ #else
+ , ${attribute.name} DESC
+ #end
+ #set($i=$i+1)
+ #end
+#end
+ LIMIT #{recordCountPerPage} OFFSET #{firstIndex}
+#elseif($vender == "Oracle")
+SELECT * FROM (
+ SELECT A.*, ROWNUM RNUM FROM (
+ SELECT
+ #set($i=0)
+ #foreach($attribute in $model.attributes)
+ #if($i == 0)
+ ${attribute.name}
+ #else
+ , ${attribute.name}
+ #end
+ #set($i=$i+1)
+ #end
+ FROM ${model.entity.name}
+ WHERE 1=1
+
+ AND
+ ${model.attributes.get(0).name} = #{searchKeyword}
+
+ AND
+ ${model.attributes.get(1).name} LIKE '%' || #{searchKeyword} || '%'
+
+
+ ORDER BY
+#if(!${model.primaryKeys} == [])
+ ${model.attributes.get(0).name} DESC
+#else
+ #set($i=0)
+ #foreach($attribute in $model.primaryKeys)
+ #if($i == 0)
+ ${attribute.name} DESC
+ #else
+ , ${attribute.name} DESC
+ #end
+ #set($i=$i+1)
+ #end
+#end
+
+ #{firstIndex}
+]]>
+#elseif($vender == "MySql" || $vender == "postgres")
+ SELECT
+ #set($i=0)
+ #foreach($attribute in $model.attributes)
+ #if($i == 0)
+ ${attribute.name}
+ #else
+ , ${attribute.name}
+ #end
+ #set($i=$i+1)
+ #end
+ FROM ${model.entity.name}
+ WHERE 1=1
+
+ AND
+ ${model.attributes.get(0).name} = #{searchKeyword}
+
+ AND
+ ${model.attributes.get(1).name} LIKE CONCAT('%',#{searchKeyword},'%')
+
+
+ ORDER BY
+#if(!${model.primaryKeys} == [])
+ ${model.attributes.get(0).name} DESC
+#else
+ #set($i=0)
+ #foreach($attribute in $model.primaryKeys)
+ #if($i == 0)
+ ${attribute.name} DESC
+ #else
+ , ${attribute.name} DESC
+ #end
+ #set($i=$i+1)
+ #end
+#end
+ limit #{recordCountPerPage} offset #{firstIndex}
+#else
+
+#end
+
+## ##################################################################################################
+
+#if($vender == "HSQLDB")
+ SELECT COUNT(*) totcnt
+ FROM ${model.entity.name}
+ WHERE 1=1
+
+ AND
+ ${model.attributes.get(0).name} = #{searchKeyword}
+
+ AND
+ ${model.attributes.get(1).name} LIKE '%' || #{searchKeyword} || '%'
+
+
+#elseif($vender == "Oracle")
+ SELECT COUNT(*) totcnt
+ FROM ${model.entity.name}
+ WHERE 1=1
+
+ AND
+ ${model.attributes.get(0).name} = #{searchKeyword}
+
+ AND
+ ${model.attributes.get(1).name} LIKE '%' || #{searchKeyword} || '%'
+
+
+#elseif($vender == "MySql" || $vender == "postgres")
+ SELECT COUNT(*) totcnt
+ FROM ${model.entity.name}
+ WHERE 1=1
+
+ AND
+ ${model.attributes.get(0).name} = #{searchKeyword}
+
+ AND
+ ${model.attributes.get(1).name} LIKE CONCAT('%',#{searchKeyword},'%')
+
+
+#else
+
+#end
+
+
+
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/crud/resource/pkg/EgovSample_Sample2_SQL.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/crud/resource/pkg/EgovSample_Sample2_SQL_OLD.vm
similarity index 82%
rename from egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/crud/resource/pkg/EgovSample_Sample2_SQL.vm
rename to egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/crud/resource/pkg/EgovSample_Sample2_SQL_OLD.vm
index 81263bdc2..7ffaea30d 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/crud/resource/pkg/EgovSample_Sample2_SQL.vm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/crud/resource/pkg/EgovSample_Sample2_SQL_OLD.vm
@@ -24,12 +24,12 @@
##
##
-
+
## --------------------------------------------------------------------------------------------------------
-
+
## --------------------------------------------------------------------------------------------------------
@@ -85,14 +85,18 @@
#set($i=$i+1)
#end
##
-#set($i=0)
-#foreach($attribute in $model.primaryKeys)
-#if($i == 0)
- WHERE ${attribute.name}=#${attribute.ccName}#
+#if(!${model.primaryKeys} == [])
+ WHERE ${model.attributes.get(0).name}=#${model.attributes.get(0).ccName}#
#else
- AND ${attribute.name}=#${attribute.ccName}#
-#end
-#set($i=$i+1)
+ #set($i=0)
+ #foreach($attribute in $model.primaryKeys)
+ #if($i == 0)
+ WHERE ${attribute.name}=#${attribute.ccName}#
+ #else
+ AND ${attribute.name}=#${attribute.ccName}#
+ #end
+ #set($i=$i+1)
+ #end
#end
]]>
@@ -101,14 +105,18 @@
@@ -127,14 +135,18 @@
#set($i=$i+1)
#end
FROM ${model.entity.name}
-#set($i=0)
-#foreach($attribute in $model.primaryKeys)
-#if($i == 0)
- WHERE ${attribute.name}=#${attribute.ccName}#
-#else
- AND ${attribute.name}=#${attribute.ccName}#
-#end
-#set($i=$i+1)
+#if(!${model.primaryKeys} == [])
+ WHERE ${model.attributes.get(0).name}=#${model.attributes.get(0).ccName}#
+#else
+ #set($i=0)
+ #foreach($attribute in $model.primaryKeys)
+ #if($i == 0)
+ WHERE ${attribute.name}=#${attribute.ccName}#
+ #else
+ AND ${attribute.name}=#${attribute.ccName}#
+ #end
+ #set($i=$i+1)
+ #end
#end
]]>
@@ -161,6 +173,9 @@
${model.attributes.get(1).name} LIKE '%' || #searchKeyword# || '%'
ORDER BY
+#if(!${model.primaryKeys} == [])
+ ${model.attributes.get(0).name} DESC
+#else
#set($i=0)
#foreach($attribute in $model.primaryKeys)
#if($i == 0)
@@ -170,20 +185,11 @@
#end
#set($i=$i+1)
#end
+#end
LIMIT #recordCountPerPage# OFFSET #firstIndex#
#elseif($vender == "Oracle")
- SELECT
- #set($i=0)
- #foreach($attribute in $model.attributes)
- #if($i == 0)
- A.${attribute.name}
- #else
- , A.${attribute.name}
- #end
- #set($i=$i+1)
- #end
- FROM
- (
+SELECT * FROM (
+ SELECT A.*, ROWNUM RNUM FROM (
SELECT
#set($i=0)
#foreach($attribute in $model.attributes)
@@ -194,7 +200,6 @@
#end
#set($i=$i+1)
#end
- , ROWNUM
FROM ${model.entity.name}
WHERE 1=1
@@ -204,6 +209,9 @@
${model.attributes.get(1).name} LIKE '%' || #searchKeyword# || '%'
ORDER BY
+#if(!${model.primaryKeys} == [])
+ ${model.attributes.get(0).name} DESC
+#else
#set($i=0)
#foreach($attribute in $model.primaryKeys)
#if($i == 0)
@@ -213,8 +221,12 @@
#end
#set($i=$i+1)
#end
- ) A
- WHERE ROWNUM BETWEEN #firstIndex# AND #recordCountPerPage#
+#end
+
+ #firstIndex#
+]]>
#elseif($vender == "MySql")
SELECT
#set($i=0)
@@ -235,6 +247,9 @@
${model.attributes.get(1).name} LIKE CONCAT('%',#searchKeyword#,'%')
ORDER BY
+#if(!${model.primaryKeys} == [])
+ ${model.attributes.get(0).name} DESC
+#else
#set($i=0)
#foreach($attribute in $model.primaryKeys)
#if($i == 0)
@@ -244,6 +259,7 @@
#end
#set($i=$i+1)
#end
+#end
limit #firstIndex#, #recordCountPerPage#
#else
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/crud/wizard.xml b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/crud/wizard.xml
index 1426544d5..aac50b1a7 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/crud/wizard.xml
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/crud/wizard.xml
@@ -22,12 +22,14 @@
-
+
+ required="true" type="folder" />
+
-
-
- -->
+
@@ -82,7 +84,13 @@
container="daoPackage">
+
+
+
+
+ com.mchange
+ c3p0
+ 0.10.1
+
+
+ === Gradle ===
+ implementation 'com.mchange:c3p0:0.10.1'
+ */
+}
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/c3p0.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/c3p0.vm
index a7a42f19f..e9da7bc22 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/c3p0.vm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/c3p0.vm
@@ -1,10 +1,10 @@
-
+
-
+
@@ -24,4 +24,17 @@
by allowing multiple operations to be performed simultaneously -->
+
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/datasource.xml b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/datasource.xml
index c38242099..678d05057 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/datasource.xml
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/datasource.xml
@@ -6,18 +6,25 @@
Create Datasource.
-
-
-
+
+
+
+ XML
+ Java
+
+
+
+
+
+
+
-
-
+
+
- C3P0
DBCP
+ C3P0
JDBC
@@ -29,20 +36,42 @@
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/dbcp-java.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/dbcp-java.vm
new file mode 100644
index 000000000..a884e7e02
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/dbcp-java.vm
@@ -0,0 +1,47 @@
+package ${txtConfigPackage};
+
+import org.apache.commons.dbcp2.BasicDataSource;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+public class ${templateUtil.substringAfterLast(${txtClassName}, ".")} {
+
+ @Bean(name="${txtDatasourceName}", destroyMethod = "close")
+ public BasicDataSource dataSource(
+ @Value("${txtDriver}") String driverClassName,
+ @Value("${txtUrl}") String url,
+ @Value("${txtUser}") String username,
+ @Value("${txtPasswd}") String password) {
+
+ BasicDataSource dataSource = new BasicDataSource();
+ dataSource.setDriverClassName(driverClassName);
+ dataSource.setUrl(url);
+ dataSource.setUsername(username);
+
+ if (!password.isEmpty()) {
+ dataSource.setPassword(password);
+ }
+
+ dataSource.setDefaultAutoCommit(false);
+ /* preparedStatement 풀링 여부
+ dataSource.setPoolPreparedStatements(true);
+ dataSource.setMaxOpenPreparedStatements(50);
+ */
+
+ return dataSource;
+ }
+
+ /* 다음 라이브러리 추가 필요
+ === Maven pom.xml ===
+
+ org.apache.commons
+ commons-dbcp2
+ 2.9.0
+
+
+ === Gradle ===
+ implementation 'org.apache.commons:commons-dbcp2:2.9.0'
+ */
+}
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/dbcp.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/dbcp.vm
index b229b554f..7b30cb037 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/dbcp.vm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/dbcp.vm
@@ -1,16 +1,33 @@
-
+
-
+
#if(${txtPasswd} != "")
#end
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/jdbc-java.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/jdbc-java.vm
new file mode 100644
index 000000000..d467d1e48
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/jdbc-java.vm
@@ -0,0 +1,67 @@
+package ${txtConfigPackage};
+
+import org.springframework.jdbc.datasource.DriverManagerDataSource;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import javax.sql.DataSource;
+
+@Configuration
+public class ${templateUtil.substringAfterLast(${txtClassName}, ".")} {
+
+ @Bean(name="${txtDatasourceName}")
+ public DataSource dataSource(
+ @Value("${txtDriver}") String driverClassName,
+ @Value("${txtUrl}") String url,
+ @Value("${txtUser}") String username,
+ @Value("${txtPasswd}") String password) {
+
+ DriverManagerDataSource dataSource = new DriverManagerDataSource();
+ dataSource.setDriverClassName(driverClassName);
+ dataSource.setUrl(url);
+ dataSource.setUsername(username);
+
+ if (password != null && !password.isEmpty()) {
+ dataSource.setPassword(password);
+ }
+
+ return dataSource;
+ }
+
+ /* 다음 JDBC Driver 라이브러리 추가 필요
+ === Maven pom.xml ===
+
+ mysql
+ mysql-connector-java
+ 8.0.33
+
+
+ org.mariadb.jdbc
+ mariadb-java-client
+ 3.1.4
+
+
+ org.postgresql
+ postgresql
+ 42.6.0
+
+
+ cubrid
+ cubrid-jdbc
+ 10.2.15.8978
+
+
+ com.altibase
+ altibase-jdbc
+ 7.1.0.9.2
+
+
+ === Gradle ===
+ implementation 'mysql:mysql-connector-java:8.0.33'
+ implementation 'org.mariadb.jdbc:mariadb-java-client:3.1.4'
+ implementation 'org.postgresql:postgresql:42.6.0'
+ implementation 'cubrid:cubrid-jdbc:10.2.15.8978'
+ implementation 'com.altibase:altibase-jdbc:7.1.0.9.2'
+ */
+}
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/jdbc.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/jdbc.vm
index defa763e8..971ac8761 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/jdbc.vm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/jdbc.vm
@@ -1,7 +1,8 @@
-
+
@@ -10,5 +11,42 @@
#if(${txtPasswd} != "")
#end
-
+
+
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/jndiDatasource-java.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/jndiDatasource-java.vm
new file mode 100644
index 000000000..fa5585a7a
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/jndiDatasource-java.vm
@@ -0,0 +1,29 @@
+package ${txtConfigPackage};
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.jndi.JndiObjectFactoryBean;
+
+@Configuration
+public class ${templateUtil.substringAfterLast(${txtClassName}, ".")} {
+
+ @Bean(name = "${txtDatasourceName}")
+ public JndiObjectFactoryBean dataSource() {
+ JndiObjectFactoryBean jndiObjectFactoryBean = new JndiObjectFactoryBean();
+ jndiObjectFactoryBean.setJndiName("${txtJndiName}");
+ return jndiObjectFactoryBean;
+ }
+
+ /* 다음 라이브러리 추가 필요
+ === Maven pom.xml ===
+
+ org.apache.commons
+ commons-dbcp2
+ 2.9.0
+
+
+ === Gradle ===
+ implementation '~~~'
+ */
+
+}
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/jndiDatasource.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/jndiDatasource.vm
index 8b9b67b34..88145e311 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/jndiDatasource.vm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/jndiDatasource.vm
@@ -1,7 +1,18 @@
-#if ($rdoType == "Jeus")
- #parse("jeus.vm")
-#elseif ($rdoType == "Weblogic")
- #parse("weblogic.vm")
-#else
- NoTypeError!
-#end
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/jndiDatasource.xml b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/jndiDatasource.xml
index 315b875bc..2e2b7853e 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/jndiDatasource.xml
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/jndiDatasource.xml
@@ -7,38 +7,35 @@
Create JNDI DataSource
-
-
-
-
-
+
- Jeus
- Weblogic
+ XML
+ Java
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
+
-
-
+
+
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/weblogic.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/weblogic.vm
deleted file mode 100644
index 666b2d17c..000000000
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/datasource/weblogic.vm
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/idGeneration/sequenceId-java.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/idGeneration/sequenceId-java.vm
new file mode 100644
index 000000000..52205492c
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/idGeneration/sequenceId-java.vm
@@ -0,0 +1,22 @@
+package ${txtConfigPackage};
+import javax.sql.DataSource;
+
+import org.egovframe.rte.fdl.idgnr.impl.EgovSequenceIdGnrServiceImpl;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+public class ${templateUtil.substringAfterLast(${txtClassName}, ".")} {
+
+ @Bean(name="${txtIdServiceName}", destroyMethod = "destroy")
+ public EgovSequenceIdGnrServiceImpl sequenceIdGnrService(@Qualifier("${txtDatasourceName}") DataSource dataSource) {
+ EgovSequenceIdGnrServiceImpl egovSequenceIdGnrService = new EgovSequenceIdGnrServiceImpl();
+ egovSequenceIdGnrService.setDataSource(dataSource);
+ egovSequenceIdGnrService.setQuery("${txtQuery}");
+#if(${rdoType} == "BigDecimal")
+ egovSequenceIdGnrService.setUseBigDecimals(true);
+#end
+ return egovSequenceIdGnrService;
+ }
+}
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/idGeneration/sequenceId.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/idGeneration/sequenceId.vm
index 944090cf3..3cb1963f1 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/idGeneration/sequenceId.vm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/idGeneration/sequenceId.vm
@@ -1,14 +1,15 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">
-
#if(${rdoType} == "BigDecimal")
-#end
-
+#end
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/idGeneration/sequenceId.xml b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/idGeneration/sequenceId.xml
index cd5209f76..838bfe09d 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/idGeneration/sequenceId.xml
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/idGeneration/sequenceId.xml
@@ -7,10 +7,17 @@
Create Sequence ID Generation
-
-
+
+
+ XML
+ Java
+
+
+
+
+
+
+
@@ -20,16 +27,21 @@
+ required="true" value="sequenceIdGnrService" />
-
+ required="true" value="dataSource" />
+
+
+
+
+
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/idGeneration/tableId-java.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/idGeneration/tableId-java.vm
new file mode 100644
index 000000000..d640a999a
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/idGeneration/tableId-java.vm
@@ -0,0 +1,36 @@
+package ${txtConfigPackage};
+import javax.sql.DataSource;
+
+import org.egovframe.rte.fdl.idgnr.impl.EgovTableIdGnrServiceImpl;
+import org.egovframe.rte.fdl.idgnr.impl.strategy.EgovIdGnrStrategyImpl;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+public class ${templateUtil.substringAfterLast(${txtClassName}, ".")} {
+
+ @Bean(name="${txtIdServiceName}", destroyMethod = "destroy")
+ public EgovTableIdGnrServiceImpl tableIdGnrService(@Qualifier("${txtDatasourceName}") DataSource dataSource
+ ,@Qualifier("${txtStrategyName}") EgovIdGnrStrategyImpl prefixIdGnrStrategy) {
+ EgovTableIdGnrServiceImpl egovTableIdGnrService = new EgovTableIdGnrServiceImpl();
+ egovTableIdGnrService.setDataSource(dataSource);
+ egovTableIdGnrService.setTable("${txtTableId}");
+ egovTableIdGnrService.setTableName("${txtTableName}");
+ egovTableIdGnrService.setBlockSize(${txtBlockSize});
+#if(${chkStrategy})
+ egovTableIdGnrService.setStrategy(prefixIdGnrStrategy);
+#end
+ return egovTableIdGnrService;
+ }
+#if(${chkStrategy})
+ @Bean(name="${txtStrategyName}")
+ public EgovIdGnrStrategyImpl prefixIdGnrStrategy() {
+ EgovIdGnrStrategyImpl egovIdGnrStrategy = new EgovIdGnrStrategyImpl();
+ egovIdGnrStrategy.setPrefix("${txtPrefix}");
+ egovIdGnrStrategy.setCipers(${txtCipers});
+ egovIdGnrStrategy.setFillChar('${txtFillChar}');
+ return egovIdGnrStrategy;
+ }
+#end
+}
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/idGeneration/tableId.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/idGeneration/tableId.vm
index 52053edc4..c13a7fb83 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/idGeneration/tableId.vm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/idGeneration/tableId.vm
@@ -1,25 +1,24 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">
-
-
-
-
-
-#if(${chkStrategy})
-
-#end
-
+
+
+
+
+#if(${chkStrategy})
+
+#end
+
-#if(${chkStrategy})
-
+#if(${chkStrategy})
+
-
-
-#end
-
\ No newline at end of file
+
+#end
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/idGeneration/tableId.xml b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/idGeneration/tableId.xml
index 814f03a13..4e77d4d6b 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/idGeneration/tableId.xml
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/idGeneration/tableId.xml
@@ -7,37 +7,45 @@
Create Table ID Generation
-
-
+
+
+ XML
+ Java
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/idGeneration/uuId-java.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/idGeneration/uuId-java.vm
new file mode 100644
index 000000000..7a092a319
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/idGeneration/uuId-java.vm
@@ -0,0 +1,25 @@
+package ${txtConfigPackage};
+import java.security.NoSuchAlgorithmException;
+
+import org.egovframe.rte.fdl.cmmn.exception.FdlException;
+import org.egovframe.rte.fdl.idgnr.impl.EgovUUIdGnrServiceImpl;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+public class ${templateUtil.substringAfterLast(${txtClassName}, ".")} {
+
+ @Bean(name="${txtIdServiceName}")
+ public EgovUUIdGnrServiceImpl uuidIdGnrService() {
+ EgovUUIdGnrServiceImpl egovUUIdGnrService = new EgovUUIdGnrServiceImpl();
+#if(${rdoType} == "Address")
+ try {
+ egovUUIdGnrService.setAddress("${txtAddress}");
+ } catch (FdlException | NoSuchAlgorithmException e) {
+ e.printStackTrace();
+ }
+#end
+ return egovUUIdGnrService;
+ }
+
+}
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/idGeneration/uuId.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/idGeneration/uuId.vm
index 22b6e85a3..dca90bf08 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/idGeneration/uuId.vm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/idGeneration/uuId.vm
@@ -1,14 +1,14 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">
-
-#if(${rdoType} == "Address")
+
+#if(${rdoType} == "Address")
${txtAddress}
-#end
-
-
-
\ No newline at end of file
+#end
+
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/idGeneration/uuId.xml b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/idGeneration/uuId.xml
index 899634c7f..e18c6cffc 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/idGeneration/uuId.xml
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/idGeneration/uuId.xml
@@ -9,25 +9,29 @@
(Address is MAC Address or IP Address)
-
-
+
+
+ XML
+ Java
+
+
+
+
+
+
+
-
+
-
+
None
Address
-
+
@@ -36,6 +40,11 @@
+
+
+
+
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/console-properties.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/console-properties.vm
new file mode 100644
index 000000000..1aa138aa9
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/console-properties.vm
@@ -0,0 +1,28 @@
+#set($txtAppenderName = $txtAppenderName.replace(".", "-"))
+
+# Appender Configuration
+appender.console0.type = Console
+appender.console0.name = ${txtAppenderName}
+appender.console0.target = SYSTEM_OUT
+appender.console0.layout.type = PatternLayout
+appender.console0.layout.pattern = ${txtConversionPattern}
+
+# Logger Configuration
+logger.egovframework.name = egovframework
+logger.egovframework.level = DEBUG
+logger.egovframework.additivity = false
+logger.egovframework.appenderRef.console0.ref = ${txtAppenderName}
+
+logger.org_egovframe.name = org.egovframe
+logger.org_egovframe.level = DEBUG
+logger.org_egovframe.additivity = false
+logger.org_egovframe.appenderRef.console0.ref = ${txtAppenderName}
+
+logger.org_springframework.name = org.springframework
+logger.org_springframework.level = DEBUG
+logger.org_springframework.additivity = false
+logger.org_springframework.appenderRef.console0.ref = ${txtAppenderName}
+
+# Root Logger Configuration
+rootLogger.level = INFO
+rootLogger.appenderRef.console0.ref = ${txtAppenderName}
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/console-yaml.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/console-yaml.vm
new file mode 100644
index 000000000..38b6ca556
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/console-yaml.vm
@@ -0,0 +1,29 @@
+Configuration:
+ Appenders:
+ Console:
+ name: "${txtAppenderName}"
+ target: SYSTEM_OUT
+ PatternLayout:
+ pattern: "${txtConversionPattern}"
+
+ Loggers:
+ Logger:
+ - name: "egovframework"
+ level: DEBUG
+ additivity: false
+ AppenderRef:
+ ref: "${txtAppenderName}"
+ - name: "org.egovframe"
+ level: DEBUG
+ additivity: false
+ AppenderRef:
+ ref: "${txtAppenderName}"
+ - name: "org.springframework"
+ level: DEBUG
+ additivity: false
+ AppenderRef:
+ ref: "${txtAppenderName}"
+ Root:
+ level: INFO
+ AppenderRef:
+ ref: "${txtAppenderName}"
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/console.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/console.vm
index cf8c1c3d6..7399495ca 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/console.vm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/console.vm
@@ -1,21 +1,23 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/console.xml b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/console.xml
index 1390fcf77..c5c8b29ea 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/console.xml
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/console.xml
@@ -6,23 +6,38 @@
Create Console Appender
+
+
+
+ XML
+ YAML
+ Properties
+
+
+
-
-
+
+
-
-
+
+
+ extension="xml" container="txtPath" >
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/dailyRollingFile.xml b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/dailyRollingFile.xml
deleted file mode 100644
index 27c528a34..000000000
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/dailyRollingFile.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
- New Daily Rolling File Appender
-
-
-
- Create Daily Rolling File Appender
-
-
-
-
-
-
-
-
-
- true
- false
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/egovDb.xml b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/egovDb.xml
deleted file mode 100644
index f0a6792eb..000000000
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/egovDb.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
- New eGovDB Appender
-
-
-
- Create eGovDB Appender
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/egovJdbc.xml b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/egovJdbc.xml
deleted file mode 100644
index 916c59535..000000000
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/egovJdbc.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
- New eGovJDBC Appender
-
-
-
- Create eGovJDBC Appender
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/file-properties.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/file-properties.vm
new file mode 100644
index 000000000..d7b2afb42
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/file-properties.vm
@@ -0,0 +1,27 @@
+# File Appender 설정
+appender.file0.type = File
+appender.file0.name = ${txtAppenderName}
+appender.file0.fileName = ${txtLogFileName}
+appender.file0.append = ${cboAppend}
+appender.file0.layout.type = PatternLayout
+appender.file0.layout.pattern = ${txtConversionPattern}
+
+# Logger 설정
+logger.egovframework.name = egovframework
+logger.egovframework.level = DEBUG
+logger.egovframework.additivity = false
+logger.egovframework.appenderRef.file0.ref = ${txtAppenderName}
+
+logger.org-egovframe.name = org.egovframe
+logger.org-egovframe.level = DEBUG
+logger.org-egovframe.additivity = false
+logger.org-egovframe.appenderRef.file0.ref = ${txtAppenderName}
+
+logger.org-springframework.name = org.springframework
+logger.org-springframework.level = INFO
+logger.org-springframework.additivity = false
+logger.org-springframework.appenderRef.file0.ref = ${txtAppenderName}
+
+# Root Logger 설정
+rootLogger.level = INFO
+rootLogger.appenderRef.file0.ref = ${txtAppenderName}
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/file-yaml.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/file-yaml.vm
new file mode 100644
index 000000000..e97dd07b6
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/file-yaml.vm
@@ -0,0 +1,30 @@
+Configuration:
+ Appenders:
+ File:
+ name: ${txtAppenderName}
+ fileName: "${txtLogFileName}"
+ append: ${cboAppend}
+ PatternLayout:
+ pattern: "${txtConversionPattern}"
+ Loggers:
+ Logger:
+ - name: "egovframework"
+ level: DEBUG
+ additivity: false
+ appenderRef:
+ - ref: ${txtAppenderName}
+ - name: "org.egovframe"
+ level: DEBUG
+ additivity: false
+ appenderRef:
+ - ref: ${txtAppenderName}
+ - name: "org.springframework"
+ level: DEBUG
+ additivity: false
+ appenderRef:
+ - ref: ${txtAppenderName}
+
+ Root:
+ level: INFO
+ appenderRef:
+ - ref: ${txtAppenderName}
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/file.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/file.vm
index 1caa78665..a900388b9 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/file.vm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/file.vm
@@ -1,23 +1,23 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/file.xml b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/file.xml
index d55265631..611e14da5 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/file.xml
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/file.xml
@@ -6,17 +6,22 @@
Create File Appender
+
+
+
+ XML
+ YAML
+ Properties
+
+
+
-
-
+
+
-
-
+
+
@@ -24,14 +29,23 @@
false
-
+
+ extension="xml" container="txtPath" >
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/jdbc-yaml.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/jdbc-yaml.vm
new file mode 100644
index 000000000..705536996
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/jdbc-yaml.vm
@@ -0,0 +1,60 @@
+Configuration:
+ Appenders:
+ JDBC:
+ name: ${txtAppenderName}
+ tableName: ${txtTableName}
+#if(${rdoConnectionType} == "ConnectionFactory")
+ ConnectionFactory:
+ class: "${txtConnectionFactoryClass}"
+ method: "${txtConnectionFactoryMethod}"
+#end
+#if(${rdoConnectionType} == "DriverManager")
+ DriverManager:
+ driverClassName: ${txtDriverClass}
+ connectionString: ${txtUrl}
+ userName: ${txtUser}
+ password: ${txtPasswd}
+#end
+ Column:
+ - name: "reg_dt"
+ isEventTimestamp: true
+ - name: "level"
+ pattern: "%p"
+ - name: "logger"
+ pattern: "%c"
+ - name: "message"
+ pattern: "%m"
+ - name: "exception"
+ pattern: "%ex{full}"
+ # Filters 설정
+ # Filters:
+ # - ThresholdFilter:
+ # level: "INFO"
+ # onMatch: "DENY"
+ # onMismatch: "NEUTRAL"
+ # - RegexFilter:
+ # regex: ".*Exception.*"
+ # onMatch: "NEUTRAL"
+ # onMismatch: "DENY"
+ Loggers:
+ Logger:
+ - name: "egovframework"
+ level: DEBUG
+ additivity: false
+ appenderRef:
+ - ref: ${txtAppenderName}
+ - name: "org.egovframe"
+ level: DEBUG
+ additivity: false
+ appenderRef:
+ - ref: ${txtAppenderName}
+ - name: "org.springframework"
+ level: DEBUG
+ additivity: false
+ appenderRef:
+ - ref: ${txtAppenderName}
+
+ Root:
+ level: INFO
+ appenderRef:
+ - ref: ${txtAppenderName}
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/jdbc.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/jdbc.vm
index 3d1823acf..8a1366a86 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/jdbc.vm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/jdbc.vm
@@ -1,23 +1,52 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+#if(${rdoConnectionType} == "ConnectionFactory")
+
+
+#end
+#if(${rdoConnectionType} == "DriverManager")
+
+
+
+
+
+#end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/jdbc.xml b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/jdbc.xml
index 36ee656b0..5101c7067 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/jdbc.xml
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/jdbc.xml
@@ -6,31 +6,46 @@
Create JDBC Appender
+
+
+
+ XML
+ YAML
+
+
+
-
-
+
+
-
-
-
-
-
-
+
+
+ DriverManager
+ ConnectionFactory
+
+
+
+
+
+
+
+
+
+
+
+ extension="xml" container="txtPath" >
+
+
+
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/rollingFile-properties.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/rollingFile-properties.vm
new file mode 100644
index 000000000..179ee8a84
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/rollingFile-properties.vm
@@ -0,0 +1,32 @@
+# File Appender 설정
+appender.rolling_file0.type = RollingFile
+appender.rolling_file0.name = ${txtAppenderName}
+appender.rolling_file0.fileName = ${txtLogFileName}
+appender.rolling_file0.filePattern = ${txtLogFileNamePattern}
+appender.rolling_file0.layout.type = PatternLayout
+appender.rolling_file0.layout.pattern = ${txtConversionPattern}
+appender.rolling_file0.policies.type = Policies
+appender.rolling_file0.policies.size.type = SizeBasedTriggeringPolicy
+appender.rolling_file0.policies.size.size = ${txtMaxFileSize}
+appender.rolling_file0.strategy.type = DefaultRolloverStrategy
+appender.rolling_file0.strategy.max = ${txtMaxIndex}
+
+# Logger 설정
+logger.egovframework.name = egovframework
+logger.egovframework.level = DEBUG
+logger.egovframework.additivity = false
+logger.egovframework.appenderRef.rolling_file0.ref = ${txtAppenderName}
+
+logger.org-egovframe.name = org.egovframe
+logger.org-egovframe.level = DEBUG
+logger.org-egovframe.additivity = false
+logger.org-egovframe.appenderRef.rolling_file0.ref = ${txtAppenderName}
+
+logger.org-springframework.name = org.springframework
+logger.org-springframework.level = INFO
+logger.org-springframework.additivity = false
+logger.org-springframework.appenderRef.rolling_file0.ref = ${txtAppenderName}
+
+# Root Logger 설정
+rootLogger.level = INFO
+rootLogger.appenderRef.rolling_file0.ref = ${txtAppenderName}
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/rollingFile-yaml.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/rollingFile-yaml.vm
new file mode 100644
index 000000000..07dbaf5ae
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/rollingFile-yaml.vm
@@ -0,0 +1,35 @@
+Configuration:
+ Appenders:
+ RollingFile:
+ name: ${txtAppenderName}
+ fileName: "${txtLogFileName}"
+ filePattern: "${txtLogFileNamePattern}"
+ PatternLayout:
+ pattern: "${txtConversionPattern}"
+ Policies:
+ SizeBasedTriggeringPolicy:
+ size: ${txtMaxFileSize}
+ DefaultRolloverStrategy:
+ max: ${txtMaxIndex}
+ Loggers:
+ Logger:
+ - name: "egovframework"
+ level: DEBUG
+ additivity: false
+ appenderRef:
+ - ref: ${txtAppenderName}
+ - name: "org.egovframe"
+ level: DEBUG
+ additivity: false
+ appenderRef:
+ - ref: ${txtAppenderName}
+ - name: "org.springframework"
+ level: DEBUG
+ additivity: false
+ appenderRef:
+ - ref: ${txtAppenderName}
+
+ Root:
+ level: INFO
+ appenderRef:
+ - ref: ${txtAppenderName}
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/rollingFile.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/rollingFile.vm
index 66ddd86f8..c29b9dafe 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/rollingFile.vm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/rollingFile.vm
@@ -1,28 +1,27 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/rollingFile.xml b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/rollingFile.xml
index 55b8f164b..b18ab258f 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/rollingFile.xml
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/rollingFile.xml
@@ -6,29 +6,42 @@
Create Rolling File Appender
+
+
+
+ XML
+ YAML
+ Properties
+
+
+
-
-
+
+
-
-
-
-
-
+
+
+
+
+
+
+ extension="xml" container="txtPath" >
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/timeBasedRollingFile-properties.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/timeBasedRollingFile-properties.vm
new file mode 100644
index 000000000..3c5a255ff
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/timeBasedRollingFile-properties.vm
@@ -0,0 +1,34 @@
+# File Appender 설정
+appender.rolling-file-time0.type = RollingFile
+appender.rolling-file-time0.name = ${txtAppenderName}
+appender.rolling-file-time0.fileName = ${txtLogFileName}
+# %d{yyyy-MM-dd-HH-mm-ss}
+appender.rolling-file-time0.filePattern = ${txtLogFileNamePattern}
+appender.rolling-file-time0.layout.type = PatternLayout
+appender.rolling-file-time0.layout.pattern = ${txtConversionPattern}
+# Time-based Rolling Policy
+appender.rolling-file-time0.policies.type = Policies
+appender.rolling-file-time0.policies.time.type = TimeBasedTriggeringPolicy
+appender.rolling-file-time0.policies.time.interval = ${txtInterval}
+appender.rolling-file-time0.policies.time.modulate = ${cboModulate}
+
+
+# Logger 설정
+logger.egovframework.name = egovframework
+logger.egovframework.level = DEBUG
+logger.egovframework.additivity = false
+logger.egovframework.appenderRef.rolling_file_time0.ref = ${txtAppenderName}
+
+logger.org-egovframe.name = org.egovframe
+logger.org-egovframe.level = DEBUG
+logger.org-egovframe.additivity = false
+logger.org-egovframe.appenderRef.rolling_file_time0.ref = ${txtAppenderName}
+
+logger.org-springframework.name = org.springframework
+logger.org-springframework.level = DEBUG
+logger.org-springframework.additivity = false
+logger.org-springframework.appenderRef.rolling_file_time0.ref = ${txtAppenderName}
+
+# Root Logger 설정
+rootLogger.level = INFO
+rootLogger.appenderRef.rolling_file_time0.ref = ${txtAppenderName}
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/timeBasedRollingFile-yaml.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/timeBasedRollingFile-yaml.vm
new file mode 100644
index 000000000..4c6180b75
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/timeBasedRollingFile-yaml.vm
@@ -0,0 +1,35 @@
+Configuration:
+ Appenders:
+ RollingFile:
+ name: ${txtAppenderName}
+ fileName: "${txtLogFileName}"
+ filePattern: "${txtLogFileNamePattern}"
+ PatternLayout:
+ pattern: "${txtConversionPattern}"
+ Policies:
+ TimeBasedTriggeringPolicy:
+ interval: ${txtInterval} # 매 시간 주기 마다 롤링
+ modulate: ${cboModulate} # 매 시간 정각에 처리
+
+ Loggers:
+ Logger:
+ - name: "egovframework"
+ level: DEBUG
+ additivity: false
+ appenderRef:
+ - ref: ${txtAppenderName}
+ - name: "org.egovframe"
+ level: DEBUG
+ additivity: false
+ appenderRef:
+ - ref: ${txtAppenderName}
+ - name: "org.springframework"
+ level: DEBUG
+ additivity: false
+ appenderRef:
+ - ref: ${txtAppenderName}
+
+ Root:
+ level: INFO
+ appenderRef:
+ - ref: ${txtAppenderName}
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/timeBasedRollingFile.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/timeBasedRollingFile.vm
new file mode 100644
index 000000000..b8d80ec7d
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/timeBasedRollingFile.vm
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/timeBasedRollingFile.xml b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/timeBasedRollingFile.xml
new file mode 100644
index 000000000..7aa0fb90d
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/logging/timeBasedRollingFile.xml
@@ -0,0 +1,52 @@
+
+
+
+ New Time-Based Rolling File Appender
+
+
+ Create Time-Based Rolling File Appender
+
+
+
+ XML
+ YAML
+ Properties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/property/property-java.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/property/property-java.vm
new file mode 100644
index 000000000..34499b811
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/property/property-java.vm
@@ -0,0 +1,47 @@
+package ${txtConfigPackage};
+import org.egovframe.rte.fdl.property.impl.EgovPropertyServiceImpl;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+@Configuration
+public class ${templateUtil.substringAfterLast(${txtClassName}, ".")} {
+
+ @Bean(name = "${txtPropertyServiceName}", destroyMethod = "destroy")
+ public EgovPropertyServiceImpl egovPropertyService() {
+
+ EgovPropertyServiceImpl egovPropertyService = new EgovPropertyServiceImpl();
+
+#if(${rdoType} == "Internal Properties")
+ // properties 설정
+ Map properties = new HashMap<>();
+ properties.put("${txtKey}", "${txtValue}");
+
+ egovPropertyService.setProperties(properties);
+#end
+
+#if(${rdoType} == "External File")
+ // extFileName 설정
+ Set extFileNameSet = new HashSet<>();
+
+ // Map 정의
+ Map extFileMap = new HashMap<>();
+ extFileMap.put("encoding", "UTF-8");
+ extFileMap.put("filename", "classpath*:/egovframework/egovProps/conf/config.properties");
+
+ // Set에 Map 추가
+ extFileNameSet.add(extFileMap);
+
+ // 필요시 주석에 있는 단일 값 추가
+ // extFileNameSet.add("classpath*:");
+
+ egovPropertyService.setExtFileName(extFileNameSet);
+#end
+
+ return egovPropertyService;
+ }
+}
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/property/property.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/property/property.vm
index b95484a42..fe45f59e7 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/property/property.vm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/property/property.vm
@@ -1,9 +1,9 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">
-
#if(${rdoType} == "Internal Properties")
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/property/property.xml b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/property/property.xml
index 9877f219c..69881db72 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/property/property.xml
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/property/property.xml
@@ -7,10 +7,17 @@
Create Property
-
-
+
+
+ XML
+ Java
+
+
+
+
+
+
+
-
+
+ radio="Internal Properties" value="pageUnit"/>
+ radio="Internal Properties" value="20"/>
@@ -41,7 +47,7 @@
UTF-8
-
@@ -49,7 +55,13 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/beanJob-java.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/beanJob-java.vm
new file mode 100644
index 000000000..2b0e35595
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/beanJob-java.vm
@@ -0,0 +1,30 @@
+package ${txtConfigPackage};
+import java.util.HashMap;
+import java.util.Map;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.quartz.CronTriggerFactoryBean;
+import org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean;
+import org.springframework.scheduling.quartz.QuartzJobBean;
+import org.springframework.scheduling.quartz.SchedulerFactoryBean;
+import org.springframework.scheduling.quartz.SimpleTriggerFactoryBean;
+
+@Configuration
+public class ${templateUtil.substringAfterLast(${txtClassName}, ".")} {
+
+ // Job Detail Bean 설정
+ @Bean(name="${txtJobName}")
+ public JobDetailFactoryBean jobDetail() {
+ JobDetailFactoryBean jobDetailFactory = new JobDetailFactoryBean();
+ jobDetailFactory.setJobClass(${txtServiceClass}.class); // QuartzJobBean 구현 클래스
+
+#if(${chkProperty})
+ Map jobDataMap = new HashMap<>();
+ jobDataMap.put("${txtPropertyName}", "${txtPropertyValue}");
+ jobDetailFactory.setJobDataAsMap(jobDataMap);
+#end
+ return jobDetailFactory;
+ }
+
+}
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/beanJob.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/beanJob.vm
index e815dc880..9180eb910 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/beanJob.vm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/beanJob.vm
@@ -1,10 +1,9 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">
-
+
#if(${chkProperty})
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/beanJob.xml b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/beanJob.xml
index e6f106184..14982d832 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/beanJob.xml
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/beanJob.xml
@@ -7,30 +7,38 @@
Create Detail Bean Job
-
-
+
+
+ XML
+ Java
+
+
+
+
+
+
+
-
-
+
+
-
-
-
+
+
+
+ extension="xml" container="txtPath">
+
+
+
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/cronTrigger-java.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/cronTrigger-java.vm
new file mode 100644
index 000000000..3c2684fed
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/cronTrigger-java.vm
@@ -0,0 +1,23 @@
+package ${txtConfigPackage};
+
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.quartz.CronTriggerFactoryBean;
+import org.springframework.scheduling.quartz.JobDetailFactoryBean;
+import org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean;
+
+
+@Configuration
+public class ${templateUtil.substringAfterLast(${txtClassName}, ".")} {
+
+ // CronTrigger 설정
+ @Bean(name="${txtTriggerName}")
+ public CronTriggerFactoryBean cronTrigger(@Qualifier("${txtJobName}") ${cboBeanType} jobDetailBean) {
+ CronTriggerFactoryBean trigger = new CronTriggerFactoryBean();
+ trigger.setJobDetail(jobDetailBean.getObject());
+ trigger.setCronExpression("${txtExpression}");
+ return trigger;
+ }
+
+}
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/cronTrigger.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/cronTrigger.vm
index cd5e302a5..3bac9ba2a 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/cronTrigger.vm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/cronTrigger.vm
@@ -1,9 +1,9 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">
-
+
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/cronTrigger.xml b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/cronTrigger.xml
index 4b48ab6f0..1dba6648c 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/cronTrigger.xml
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/cronTrigger.xml
@@ -7,25 +7,43 @@
Create Cron Trigger
-
-
+
+
+ XML
+ Java
+
+
+
+
+
+
+
-
-
+
+
+ JobDetailFactoryBean
+ MethodInvokingJobDetailFactoryBean
+
+
+
+
+
-
+
+ extension="xml" container="txtPath" >
+
+
+
+
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/methodJob-java.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/methodJob-java.vm
new file mode 100644
index 000000000..e3fc1439d
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/methodJob-java.vm
@@ -0,0 +1,21 @@
+package ${txtConfigPackage};
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean;
+
+import ${txtServiceClass};
+
+@Configuration
+public class ${templateUtil.substringAfterLast(${txtClassName}, ".")} {
+
+ // MethodInvoking JobDetail 설정
+ @Bean(name="${txtJobName}")
+ public MethodInvokingJobDetailFactoryBean testMethodInvokingJobDetail(${templateUtil.substringAfterLast(${txtServiceClass}, ".")} ${txtServiceName}) {
+ MethodInvokingJobDetailFactoryBean jobDetailFactory = new MethodInvokingJobDetailFactoryBean();
+ jobDetailFactory.setTargetObject(${txtServiceName});
+ jobDetailFactory.setTargetMethod("${txtServiceMethod}");
+ jobDetailFactory.setConcurrent(${cboConcurrent});
+ return jobDetailFactory;
+ }
+
+}
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/methodJob.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/methodJob.vm
index 0592482b0..6e21b4a56 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/methodJob.vm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/methodJob.vm
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">
#if(${chkProperty})
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/methodJob.xml b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/methodJob.xml
index 6cea84218..ce7dd72e0 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/methodJob.xml
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/methodJob.xml
@@ -7,16 +7,21 @@
Create Method Invoking Job
-
-
+
+
+ XML
+ Java
+
+
+
+
+
+
+
-
-
+
+
true
false
@@ -24,16 +29,13 @@
-
+
-
+
-
-
-
+
+
+
@@ -41,7 +43,13 @@
+ extension="xml" container="txtPath">
+
+
+
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/scheduler-java.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/scheduler-java.vm
new file mode 100644
index 000000000..8bd673865
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/scheduler-java.vm
@@ -0,0 +1,21 @@
+package ${txtConfigPackage};
+
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.quartz.CronTriggerFactoryBean;
+import org.springframework.scheduling.quartz.SchedulerFactoryBean;
+import org.springframework.scheduling.quartz.SimpleTriggerFactoryBean;
+
+@Configuration
+public class ${templateUtil.substringAfterLast(${txtClassName}, ".")} {
+
+ // Scheduler 설정
+ @Bean(name="${txtSchedulerName}")
+ public SchedulerFactoryBean schedulerFactory(@Qualifier("${txtTriggerName}") ${cboBeanType} triggerBean) {
+ SchedulerFactoryBean schedulerFactory = new SchedulerFactoryBean();
+ schedulerFactory.setTriggers(triggerBean.getObject());
+ return schedulerFactory;
+ }
+
+}
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/scheduler.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/scheduler.vm
index d1d6707c3..1a3ec217d 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/scheduler.vm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/scheduler.vm
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/scheduler.xml b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/scheduler.xml
index 2b7d83297..46444174d 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/scheduler.xml
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/scheduler.xml
@@ -7,22 +7,40 @@
Create Scheduler
-
-
+
+
+ XML
+ Java
+
+
+
+
+
+
+
-
-
+
+
+ SimpleTriggerFactoryBean
+ CronTriggerFactoryBean
+
+
+
+
+
+ extension="xml" container="txtPath" >
+
+
+
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/simpleTrigger-java.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/simpleTrigger-java.vm
new file mode 100644
index 000000000..ad41a1bde
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/simpleTrigger-java.vm
@@ -0,0 +1,22 @@
+package ${txtConfigPackage};
+
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.quartz.JobDetailFactoryBean;
+import org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean;
+import org.springframework.scheduling.quartz.SimpleTriggerFactoryBean;
+
+@Configuration
+public class ${templateUtil.substringAfterLast(${txtClassName}, ".")} {
+
+ // SimpleTrigger 설정
+ @Bean(name="${txtTriggerName}")
+ public SimpleTriggerFactoryBean simpleTrigger(@Qualifier("${txtJobName}") ${cboBeanType} jobDetailBean) {
+ SimpleTriggerFactoryBean trigger = new SimpleTriggerFactoryBean();
+ trigger.setJobDetail(jobDetailBean.getObject());
+ trigger.setStartDelay(${txtStartDelay}); // 2초 후에 시작 (milisecond)
+ trigger.setRepeatInterval(${txtRepeatInterval}); // 매 10초마다 실행 (milisecond)
+ return trigger;
+ }
+}
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/simpleTrigger.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/simpleTrigger.vm
index 71934f50d..6c959041f 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/simpleTrigger.vm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/simpleTrigger.vm
@@ -1,12 +1,12 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">
-
+
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/simpleTrigger.xml b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/simpleTrigger.xml
index bfddb0630..ff5cdc90d 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/simpleTrigger.xml
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/scheduling/simpleTrigger.xml
@@ -7,26 +7,42 @@
Create Simple Trigger
-
-
+
+
+ XML
+ Java
+
+
+
+
+
+
+
-
-
-
-
+
+
+ JobDetailFactoryBean
+ MethodInvokingJobDetailFactoryBean
+
+
+
+
+
+
+
+ extension="xml" container="txtPath">
+
+
+
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/datasource.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/datasource.vm
index 069b395c3..758cadb75 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/datasource.vm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/datasource.vm
@@ -9,40 +9,6 @@
-#if(${chkTransactionTemplate})
-
-
-
-
-#end
-#if(${chkAnnotationTransactionManagement})
-
-
-#end
-#if(${chkConfigurationalTransactionManagement})
-
-
-
-
-
-
-
-
-
-
-
-#end
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/jpa-java.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/jpa-java.vm
new file mode 100644
index 000000000..eb58623c4
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/jpa-java.vm
@@ -0,0 +1,115 @@
+package ${txtConfigPackage};
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Properties;
+
+import javax.persistence.EntityManagerFactory;
+import javax.sql.DataSource;
+
+import org.springframework.aop.Advisor;
+import org.springframework.aop.aspectj.AspectJExpressionPointcut;
+import org.springframework.aop.support.DefaultPointcutAdvisor;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor;
+import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
+import org.springframework.orm.jpa.JpaTransactionManager;
+import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
+import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
+import org.springframework.transaction.PlatformTransactionManager;
+import org.springframework.transaction.TransactionDefinition;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+import org.springframework.transaction.interceptor.NameMatchTransactionAttributeSource;
+import org.springframework.transaction.interceptor.RollbackRuleAttribute;
+import org.springframework.transaction.interceptor.RuleBasedTransactionAttribute;
+import org.springframework.transaction.interceptor.TransactionAttribute;
+import org.springframework.transaction.interceptor.TransactionInterceptor;
+
+@Configuration
+@EnableAspectJAutoProxy(proxyTargetClass = true)
+@EnableTransactionManagement
+@EnableJpaRepositories(basePackages = "${txtSpringDataJPAPackage}")
+public class ${templateUtil.substringAfterLast(${txtClassName}, ".")} {
+
+ @Bean(name = "${txtEttMgrFactory}")
+ public LocalContainerEntityManagerFactoryBean entityManagerFactory(DataSource dataSource) {
+ LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();
+ em.setDataSource(dataSource);
+ em.setPackagesToScan("${txtPackagesToScan}");
+
+ HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
+ vendorAdapter.setShowSql(true);
+ vendorAdapter.setGenerateDdl(true);
+ em.setJpaVendorAdapter(vendorAdapter);
+
+ Properties jpaProperties = new Properties();
+ jpaProperties.put("hibernate.dialect", "${cmbDialect}");
+ jpaProperties.put("hibernate.format_sql", "true");
+ jpaProperties.put("hibernate.use_sql_comments", "true");
+ jpaProperties.put("hibernate.jdbc.batch_size", "5");
+ em.setJpaProperties(jpaProperties);
+
+ return em;
+ }
+
+ @Bean(name = "${txtTransactionName}")
+ public PlatformTransactionManager transactionManager(EntityManagerFactory entityManagerFactory, DataSource dataSource) {
+ JpaTransactionManager transactionManager = new JpaTransactionManager();
+ transactionManager.setEntityManagerFactory(entityManagerFactory);
+ transactionManager.setDataSource(dataSource);
+ return transactionManager;
+ }
+
+ // AOP 설정 - 트랜잭션 관리 및 포인트컷 설정
+ @Bean(name = "${txtAdviceName}")
+ public TransactionInterceptor txAdvice(PlatformTransactionManager transactionManager) {
+ TransactionInterceptor txAdvice = new TransactionInterceptor();
+ txAdvice.setTransactionManager(transactionManager);
+ txAdvice.setTransactionAttributeSource(getNameMatchTransactionAttributeSource());
+ return txAdvice;
+ }
+
+ private NameMatchTransactionAttributeSource getNameMatchTransactionAttributeSource() {
+ NameMatchTransactionAttributeSource txAttributeSource = new NameMatchTransactionAttributeSource();
+ txAttributeSource.setNameMap(getRuleBasedTxAttributeMap());
+ return txAttributeSource;
+ }
+
+ private HashMap getRuleBasedTxAttributeMap() {
+ HashMap txMethods = new HashMap();
+
+ RuleBasedTransactionAttribute txAttribute = new RuleBasedTransactionAttribute();
+ txAttribute.setPropagationBehavior(TransactionDefinition.PROPAGATION_${cmbPropagation});
+ txAttribute.setIsolationLevel(TransactionDefinition.ISOLATION_${cmbIsolation});
+ txAttribute.setReadOnly(false);
+
+ // Creating a list for rollback rules
+ List rollbackRules = new ArrayList<>();
+ // Set to rollback when an exception occurs
+ rollbackRules.add(new RollbackRuleAttribute(${txtRollbackFor}.class));
+ txAttribute.setRollbackRules(rollbackRules);
+ txMethods.put("${txtMethodName}", txAttribute);
+
+ return txMethods;
+ }
+
+ // -------------------------------------------------------------
+ // TransactionAdvisor 설정
+ // -------------------------------------------------------------
+ @Bean
+ public Advisor txAdvisor(PlatformTransactionManager txManager) {
+ AspectJExpressionPointcut pointcut = new AspectJExpressionPointcut();
+ pointcut.setExpression("${txtPointCutExpression}");
+ return new DefaultPointcutAdvisor(pointcut, txAdvice(txManager));
+ }
+
+ // 예외변환 후처리기
+ @Bean
+ public PersistenceExceptionTranslationPostProcessor persistenceExceptionTranslationPostProcessor() {
+ return new PersistenceExceptionTranslationPostProcessor();
+ }
+
+}
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/jpa.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/jpa.vm
index 921712bc9..db0200884 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/jpa.vm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/jpa.vm
@@ -1,16 +1,61 @@
+ xmlns:context="http://www.springframework.org/schema/context"
+ xmlns:aop="http://www.springframework.org/schema/aop"
+ xmlns:tx="http://www.springframework.org/schema/tx"
+ xmlns:jpa="http://www.springframework.org/schema/data/jpa"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
+ http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
+ http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
+ http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.0.xsd">
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ${cmbDialect}
+ true
+ true
+ 5
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/jpa.xml b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/jpa.xml
index 79cde182c..5f820c90d 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/jpa.xml
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/jpa.xml
@@ -5,32 +5,129 @@
- Create JPA Transaction
+ Create JPA(Java Persistence API) Transaction
-
-
+
+
+ XML
+ Java
+
+
+
+
+
+
+
-
+
-
-
-
+ required="true" value="transactionManager" />
+ required="true" value="dataSource" />
+
+
+
+
+
+
+
+ org.hibernate.dialect.H2Dialect
+ org.hibernate.dialect.MySQL5Dialect
+ org.hibernate.dialect.MySQL5InnoDBDialect
+ org.hibernate.dialect.MySQL8Dialect
+ org.hibernate.dialect.MariaDBDialect
+ org.hibernate.dialect.MariaDB53Dialect
+ org.hibernate.dialect.MariaDB102Dialect
+ org.hibernate.dialect.MariaDB103Dialect
+ org.hibernate.dialect.PostgreSQL9Dialect
+ org.hibernate.dialect.PostgreSQL10Dialect
+ org.hibernate.dialect.PostgreSQL11Dialect
+ org.hibernate.dialect.PostgreSQL12Dialect
+ org.hibernate.dialect.Oracle10gDialect
+ org.hibernate.dialect.Oracle11gDialect
+ org.hibernate.dialect.Oracle12cDialect
+ org.hibernate.dialect.Oracle21cDialect
+ org.hibernate.dialect.SQLServer2008Dialect
+ org.hibernate.dialect.SQLServer2012Dialect
+ org.hibernate.dialect.SQLServer2016Dialect
+ org.hibernate.dialect.DB2Dialect
+ org.hibernate.dialect.DB2400Dialect
+ org.hibernate.dialect.DB2390Dialect
+ org.hibernate.dialect.HSQLDialect
+ org.hibernate.dialect.DerbyDialect
+ org.hibernate.dialect.DerbyTenSevenDialect
+ org.hibernate.dialect.DerbyTenFiveDialect
+ org.hibernate.dialect.DerbyTenSixDialect
+ org.hibernate.dialect.InformixDialect
+ org.hibernate.dialect.FirebirdDialect
+ org.hibernate.dialect.SybaseASE15Dialect
+ org.hibernate.dialect.SQLAnywhereDialect
+ org.hibernate.dialect.SQLiteDialect
+ org.hibernate.dialect.TeradataDialect
+ org.hibernate.dialect.HANARowStoreDialect
+ org.hibernate.dialect.HANACalcViewDialect
+
+
+
+
+
+
+
+
+
+
+
+
+ Configurational Transaction Management
+
+
+
+
+
+
+
+
+
+
+
+ DEFAULT
+ READ_UNCOMMITTED
+ READ_COMMITTED
+ REPEATABLE_READ
+ SERIALIZABLE
+
+
+
+
+ REQUIRED
+ SUPPORTS
+ MANDATORY
+ REQUIRES_NEW
+ NOT_SUPPORTED
+ NEVER
+ NESTED
+
+
+
+
+
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/jta-java.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/jta-java.vm
new file mode 100644
index 000000000..0f747cc90
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/jta-java.vm
@@ -0,0 +1,115 @@
+package ${txtConfigPackage};
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import javax.transaction.SystemException;
+
+import org.springframework.aop.Advisor;
+import org.springframework.aop.aspectj.AspectJExpressionPointcut;
+import org.springframework.aop.support.DefaultPointcutAdvisor;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.transaction.PlatformTransactionManager;
+import org.springframework.transaction.TransactionDefinition;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+import org.springframework.transaction.interceptor.NameMatchTransactionAttributeSource;
+import org.springframework.transaction.interceptor.RollbackRuleAttribute;
+import org.springframework.transaction.interceptor.RuleBasedTransactionAttribute;
+import org.springframework.transaction.interceptor.TransactionAttribute;
+import org.springframework.transaction.interceptor.TransactionInterceptor;
+import org.springframework.transaction.jta.JtaTransactionManager;
+
+import com.atomikos.icatch.jta.UserTransactionImp;
+import com.atomikos.icatch.jta.UserTransactionManager;
+
+@Configuration
+@EnableAspectJAutoProxy(proxyTargetClass = true)
+#if(${chkAnnotationTransactionManagement})
+@EnableTransactionManagement
+#end
+public class ${templateUtil.substringAfterLast(${txtClassName}, ".")} {
+
+ @Bean
+ public UserTransactionImp userTransaction() {
+ UserTransactionImp userTransaction = new UserTransactionImp();
+ try {
+ userTransaction.setTransactionTimeout(${txtGlobalTimeout});
+ } catch (SystemException e) {
+ e.printStackTrace();
+ }
+ return userTransaction;
+ }
+
+ @Bean(initMethod = "init", destroyMethod = "close")
+ public UserTransactionManager atomikosTransactionManager() {
+ UserTransactionManager transactionManager = new UserTransactionManager();
+ transactionManager.setForceShutdown(false);
+ return transactionManager;
+ }
+
+ @Bean(name = "${txtTransactionName}")
+ public PlatformTransactionManager transactionManager(UserTransactionImp userTransaction, UserTransactionManager atomikosTransactionManager) {
+ JtaTransactionManager transactionManager = new JtaTransactionManager();
+ transactionManager.setUserTransaction(userTransaction);
+ transactionManager.setTransactionManager(atomikosTransactionManager);
+ return transactionManager;
+ }
+
+ // AOP 설정 - 트랜잭션 관리 및 포인트컷 설정
+ @Bean(name = "${txtAdviceName}")
+ public TransactionInterceptor txAdvice(PlatformTransactionManager transactionManager) {
+ TransactionInterceptor txAdvice = new TransactionInterceptor();
+ txAdvice.setTransactionManager(transactionManager);
+ txAdvice.setTransactionAttributeSource(getNameMatchTransactionAttributeSource());
+ return txAdvice;
+ }
+
+ private NameMatchTransactionAttributeSource getNameMatchTransactionAttributeSource() {
+ NameMatchTransactionAttributeSource txAttributeSource = new NameMatchTransactionAttributeSource();
+ txAttributeSource.setNameMap(getRuleBasedTxAttributeMap());
+ return txAttributeSource;
+ }
+
+ private HashMap getRuleBasedTxAttributeMap() {
+ HashMap txMethods = new HashMap();
+
+ RuleBasedTransactionAttribute txAttribute = new RuleBasedTransactionAttribute();
+ txAttribute.setPropagationBehavior(TransactionDefinition.PROPAGATION_${cmbPropagation});
+ txAttribute.setIsolationLevel(TransactionDefinition.ISOLATION_${cmbIsolation});
+ txAttribute.setReadOnly(${chkReadOnly});
+
+ // Creating a list for rollback rules
+#if(${chkRollbackFor} || ${chkNoRollbackFor})
+ List rollbackRules = new ArrayList<>();
+#if(${chkRollbackFor})
+ // Set to rollback when an exception occurs
+ rollbackRules.add(new RollbackRuleAttribute(${txtRollbackFor}.class));
+#end
+#if(${chkNoRollbackFor})
+ // Disable rollback when exception occurs
+ rollbackRules.add(new NoRollbackRuleAttribute(${txtNoRollbackFor}.class));
+#end
+ txAttribute.setRollbackRules(rollbackRules);
+#end
+#if(${chkTimeout})
+ txAttribute.setTimeout(${txtTimeout});
+#end
+ txMethods.put("${txtMethodName}", txAttribute);
+
+ return txMethods;
+ }
+
+ // -------------------------------------------------------------
+ // TransactionAdvisor 설정
+ // -------------------------------------------------------------
+ @Bean
+ public Advisor txAdvisor(PlatformTransactionManager txManager) {
+ AspectJExpressionPointcut pointcut = new AspectJExpressionPointcut();
+ pointcut.setExpression("${txtPointCutExpression}");
+ return new DefaultPointcutAdvisor(pointcut, txAdvice(txManager));
+ }
+
+}
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/jta.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/jta.vm
index 9945c46a9..489d5319c 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/jta.vm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/jta.vm
@@ -1,19 +1,48 @@
-
+ xmlns:aop="http://www.springframework.org/schema/aop"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
+ http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
+ http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
- java.naming.factory.initial=${txtInitialFactory}
- java.naming.provider.url=${txtProviderUrl}
-
-
+
+
+
+
+
+#if(${chkAnnotationTransactionManagement})
+
+#end
+
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/jta.xml b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/jta.xml
index f723562d8..48f23f8b0 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/jta.xml
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/jta.xml
@@ -4,35 +4,96 @@
New JTA Transaction
-
- Create JTA Transaction
+
+ Create JTA(Java Transaction API) Transaction
-
-
+
+
+ XML
+ Java
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
- true
- false
+ Atomikos
-
-
+
+
+
+
+ Configurational Transaction Management
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ DEFAULT
+ READ_UNCOMMITTED
+ READ_COMMITTED
+ REPEATABLE_READ
+ SERIALIZABLE
+
+
+
+
+ REQUIRED
+ SUPPORTS
+ MANDATORY
+ REQUIRES_NEW
+ NOT_SUPPORTED
+ NEVER
+ NESTED
+
+
+
+
+
+
+
+ extension="xml" container="txtPath">
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/transaction-java.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/transaction-java.vm
new file mode 100644
index 000000000..a7306794a
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/transaction-java.vm
@@ -0,0 +1,101 @@
+package ${txtConfigPackage};
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import javax.sql.DataSource;
+
+import org.springframework.aop.Advisor;
+import org.springframework.aop.aspectj.AspectJExpressionPointcut;
+import org.springframework.aop.support.DefaultPointcutAdvisor;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.jdbc.datasource.DataSourceTransactionManager;
+import org.springframework.transaction.TransactionDefinition;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+import org.springframework.transaction.interceptor.NameMatchTransactionAttributeSource;
+import org.springframework.transaction.interceptor.NoRollbackRuleAttribute;
+import org.springframework.transaction.interceptor.RollbackRuleAttribute;
+import org.springframework.transaction.interceptor.RuleBasedTransactionAttribute;
+import org.springframework.transaction.interceptor.TransactionAttribute;
+import org.springframework.transaction.interceptor.TransactionInterceptor;
+import org.springframework.transaction.support.TransactionTemplate;
+
+@Configuration
+@EnableAspectJAutoProxy(proxyTargetClass = true)
+#if(${chkAnnotationTransactionManagement})
+@EnableTransactionManagement
+#end
+public class ${templateUtil.substringAfterLast(${txtClassName}, ".")} {
+
+ @Bean(name = "${txtTransactionName}")
+ public DataSourceTransactionManager txManager(DataSource dataSource) {
+ DataSourceTransactionManager dataSourceTransactionManager = new DataSourceTransactionManager();
+ dataSourceTransactionManager.setDataSource(dataSource);
+ return dataSourceTransactionManager;
+ }
+
+#if(${chkTransactionTemplate})
+ @Bean(name = "${txtTransactionTemplateName}")
+ public TransactionTemplate transactionTemplate(DataSourceTransactionManager transactionManager) {
+ return new TransactionTemplate(transactionManager);
+ }
+#end
+
+#if(${chkConfigurationalTransactionManagement})
+ @Bean(name = "${txtAdviceName}")
+ public TransactionInterceptor txAdvice(DataSourceTransactionManager transactionManager) {
+ TransactionInterceptor txAdvice = new TransactionInterceptor();
+ txAdvice.setTransactionManager(transactionManager);
+ txAdvice.setTransactionAttributeSource(getNameMatchTransactionAttributeSource());
+ return txAdvice;
+ }
+
+ private NameMatchTransactionAttributeSource getNameMatchTransactionAttributeSource() {
+ NameMatchTransactionAttributeSource txAttributeSource = new NameMatchTransactionAttributeSource();
+ txAttributeSource.setNameMap(getRuleBasedTxAttributeMap());
+ return txAttributeSource;
+ }
+
+ private HashMap getRuleBasedTxAttributeMap() {
+ HashMap txMethods = new HashMap();
+
+ RuleBasedTransactionAttribute txAttribute = new RuleBasedTransactionAttribute();
+ txAttribute.setPropagationBehavior(TransactionDefinition.PROPAGATION_${cmbPropagation});
+ txAttribute.setIsolationLevel(TransactionDefinition.ISOLATION_${cmbIsolation});
+ txAttribute.setReadOnly(${chkReadOnly});
+
+ // Creating a list for rollback rules
+#if(${chkRollbackFor} || ${chkNoRollbackFor})
+ List rollbackRules = new ArrayList<>();
+#if(${chkRollbackFor})
+ // Set to rollback when an exception occurs
+ rollbackRules.add(new RollbackRuleAttribute(${txtRollbackFor}.class));
+#end
+#if(${chkNoRollbackFor})
+ // Disable rollback when exception occurs
+ rollbackRules.add(new NoRollbackRuleAttribute(${txtNoRollbackFor}.class));
+#end
+ txAttribute.setRollbackRules(rollbackRules);
+#end
+#if(${chkTimeout})
+ txAttribute.setTimeout(${txtTimeout});
+#end
+ txMethods.put("${txtMethodName}", txAttribute);
+
+ return txMethods;
+ }
+
+ // -------------------------------------------------------------
+ // TransactionAdvisor 설정
+ // -------------------------------------------------------------
+ @Bean
+ public Advisor txAdvisor(DataSourceTransactionManager txManager) {
+ AspectJExpressionPointcut pointcut = new AspectJExpressionPointcut();
+ pointcut.setExpression("${txtPointCutExpression}");
+ return new DefaultPointcutAdvisor(pointcut, txAdvice(txManager));
+ }
+#end
+}
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/transaction.vm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/transaction.vm
new file mode 100644
index 000000000..6f32eab48
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/transaction.vm
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+#if(${chkTransactionTemplate})
+
+
+
+
+#end
+#if(${chkConfigurationalTransactionManagement})
+
+
+
+
+
+
+
+
+
+
+
+#end
+#if(${chkAnnotationTransactionManagement})
+
+
+#end
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/datasource.xml b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/transaction.xml
similarity index 57%
rename from egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/datasource.xml
rename to egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/transaction.xml
index c39740b36..1a5555556 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/datasource.xml
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/transaction/transaction.xml
@@ -4,19 +4,24 @@
New DataSource Transaction
-
+
Create DataSource Transaction
-
-
+
+
+ XML
+ Java
+
+
+
+
+
+
+
-
-
+
+
-
+
-
+
Configurational Transaction Management
-
-
+
+
-
+
-
+
-
+
+ label="rollback-for: [[CHECK]chkRollbackFor:true]" required="false" value="Exception"/>
+ label="no-rollback-for: [[CHECK]chkNoRollbackFor:false]" required="false" value="RuntimeException"/>
@@ -86,16 +85,18 @@
-
+
-
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/wizards.xml b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/wizards.xml
new file mode 100644
index 000000000..7df94ce62
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplates/wizards.xml
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesResult/crud/java/pkg/service/EgovSample2Service.jav b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesResult/crud/java/pkg/service/EgovSample2Service.jav
new file mode 100644
index 000000000..7e13ea049
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesResult/crud/java/pkg/service/EgovSample2Service.jav
@@ -0,0 +1,69 @@
+package pkg.service;
+
+import java.util.List;
+import pkg.service.Sample2DefaultVO;
+import pkg.service.Sample2VO;
+
+/**
+ * @Class Name : Sample2Service.java
+ * @Description : Sample2 Business class
+ * @Modification Information
+ *
+ * @author 홍길동
+ * @since 실행환경 개발팀
+ * @version 1.0
+ * @see
+ *
+ * Copyright (C) All right reserved.
+ */
+public interface Sample2Service {
+
+ /**
+ * SAMPLE2을 등록한다.
+ * @param vo - 등록할 정보가 담긴 Sample2VO
+ * @return 등록 결과
+ * @exception Exception
+ */
+ String insertSample2(Sample2VO vo) throws Exception;
+
+ /**
+ * SAMPLE2을 수정한다.
+ * @param vo - 수정할 정보가 담긴 Sample2VO
+ * @return void형
+ * @exception Exception
+ */
+ void updateSample2(Sample2VO vo) throws Exception;
+
+ /**
+ * SAMPLE2을 삭제한다.
+ * @param vo - 삭제할 정보가 담긴 Sample2VO
+ * @return void형
+ * @exception Exception
+ */
+ void deleteSample2(Sample2VO vo) throws Exception;
+
+ /**
+ * SAMPLE2을 조회한다.
+ * @param vo - 조회할 정보가 담긴 Sample2VO
+ * @return 조회한 SAMPLE2
+ * @exception Exception
+ */
+ Sample2VO selectSample2(Sample2VO vo) throws Exception;
+
+ /**
+ * SAMPLE2 목록을 조회한다.
+ * @param searchVO - 조회할 정보가 담긴 VO
+ * @return SAMPLE2 목록
+ * @exception Exception
+ */
+ List selectSample2List(Sample2DefaultVO searchVO) throws Exception;
+
+ /**
+ * SAMPLE2 총 갯수를 조회한다.
+ * @param searchVO - 조회할 정보가 담긴 VO
+ * @return SAMPLE2 총 갯수
+ * @exception
+ */
+ int selectSample2ListTotCnt(Sample2DefaultVO searchVO);
+
+}
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesResult/crud/java/pkg/service/Sample2DefaultVO.jav b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesResult/crud/java/pkg/service/Sample2DefaultVO.jav
new file mode 100644
index 000000000..672d6ec27
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesResult/crud/java/pkg/service/Sample2DefaultVO.jav
@@ -0,0 +1,125 @@
+package pkg.service;
+
+import java.io.Serializable;
+
+/**
+ * Sample2 Default VO class
+ *
+ * @author 홍길동
+ * @since 실행환경 개발팀
+ * @version 1.0
+ * @see
+ *
+ *
+ * == 개정이력(Modification Information) ==
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 실행환경 개발팀 홍길동 최초 생성
+ *
+ *
+ */
+public class Sample2DefaultVO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /** 검색조건 */
+ private String searchCondition = "";
+
+ /** 검색Keyword */
+ private String searchKeyword = "";
+
+ /** 검색사용여부 */
+ private String searchUseYn = "";
+
+ /** 현재페이지 */
+ private int pageIndex = 1;
+
+ /** 페이지갯수 */
+ private int pageUnit = 10;
+
+ /** 페이지사이즈 */
+ private int pageSize = 10;
+
+ /** firstIndex */
+ private int firstIndex = 1;
+
+ /** lastIndex */
+ private int lastIndex = 1;
+
+ /** recordCountPerPage */
+ private int recordCountPerPage = 10;
+
+ public int getFirstIndex() {
+ return firstIndex;
+ }
+
+ public void setFirstIndex(int firstIndex) {
+ this.firstIndex = firstIndex;
+ }
+
+ public int getLastIndex() {
+ return lastIndex;
+ }
+
+ public void setLastIndex(int lastIndex) {
+ this.lastIndex = lastIndex;
+ }
+
+ public int getRecordCountPerPage() {
+ return recordCountPerPage;
+ }
+
+ public void setRecordCountPerPage(int recordCountPerPage) {
+ this.recordCountPerPage = recordCountPerPage;
+ }
+
+ public String getSearchCondition() {
+ return searchCondition;
+ }
+
+ public void setSearchCondition(String searchCondition) {
+ this.searchCondition = searchCondition;
+ }
+
+ public String getSearchKeyword() {
+ return searchKeyword;
+ }
+
+ public void setSearchKeyword(String searchKeyword) {
+ this.searchKeyword = searchKeyword;
+ }
+
+ public String getSearchUseYn() {
+ return searchUseYn;
+ }
+
+ public void setSearchUseYn(String searchUseYn) {
+ this.searchUseYn = searchUseYn;
+ }
+
+ public int getPageIndex() {
+ return pageIndex;
+ }
+
+ public void setPageIndex(int pageIndex) {
+ this.pageIndex = pageIndex;
+ }
+
+ public int getPageUnit() {
+ return pageUnit;
+ }
+
+ public void setPageUnit(int pageUnit) {
+ this.pageUnit = pageUnit;
+ }
+
+ public int getPageSize() {
+ return pageSize;
+ }
+
+ public void setPageSize(int pageSize) {
+ this.pageSize = pageSize;
+ }
+
+}
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesResult/crud/java/pkg/service/Sample2VO.jav b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesResult/crud/java/pkg/service/Sample2VO.jav
new file mode 100644
index 000000000..ae9a33e28
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesResult/crud/java/pkg/service/Sample2VO.jav
@@ -0,0 +1,79 @@
+package pkg.service;
+
+/**
+ * Sample2 VO class
+ *
+ * @author 홍길동
+ * @since 실행환경 개발팀
+ * @version 1.0
+ * @see
+ *
+ *
+ * == 개정이력(Modification Information) ==
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 실행환경 개발팀 홍길동 최초 생성
+ *
+ *
+ */
+public class Sample2VO extends Sample2DefaultVO {
+
+ private static final long serialVersionUID = 1L;
+
+ /** ID */
+ private String id;
+
+ /** NAME */
+ private String name;
+
+ /** DESCRIPTION */
+ private String description;
+
+ /** USE_YN */
+ private String useYn;
+
+ /** REG_USER */
+ private String regUser;
+
+ public String getId() {
+ return this.id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getUseYn() {
+ return this.useYn;
+ }
+
+ public void setUseYn(String useYn) {
+ this.useYn = useYn;
+ }
+
+ public String getRegUser() {
+ return this.regUser;
+ }
+
+ public void setRegUser(String regUser) {
+ this.regUser = regUser;
+ }
+
+}
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesResult/crud/java/pkg/service/impl/EgovSample2ServiceImpl.jav b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesResult/crud/java/pkg/service/impl/EgovSample2ServiceImpl.jav
new file mode 100644
index 000000000..530c30d8c
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesResult/crud/java/pkg/service/impl/EgovSample2ServiceImpl.jav
@@ -0,0 +1,121 @@
+package pkg.service.impl;
+
+import java.util.List;
+
+import javax.annotation.Resource;
+
+import org.springframework.stereotype.Service;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
+import org.egovframe.rte.fdl.idgnr.EgovIdGnrService;
+import pkg.service.Sample2Service;
+import pkg.service.Sample2DefaultVO;
+import pkg.service.Sample2VO;
+import pkg.service.impl.Sample2DAO;
+import pkg.service.impl.Sample2Mapper;
+/**
+ * @Class Name : Sample2ServiceImpl.java
+ * @Description : Sample2 Business Implement class
+ * @Modification Information
+ *
+ * @author 홍길동
+ * @since 실행환경 개발팀
+ * @version 1.0
+ * @see
+ *
+ * Copyright (C) All right reserved.
+ */
+
+@Service("sample2Service")
+public class Sample2ServiceImpl extends EgovAbstractServiceImpl implements
+ Sample2Service {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(Sample2ServiceImpl.class);
+
+ @Resource(name="sample2Mapper")
+ private Sample2Mapper sample2DAO;
+
+ //@Resource(name="sample2DAO")
+ //private Sample2DAO sample2DAO;
+
+ /** ID Generation */
+ //@Resource(name="{egovSample2IdGnrService}")
+ //private EgovIdGnrService egovIdGnrService;
+
+ /**
+ * SAMPLE2을 등록한다.
+ * @param vo - 등록할 정보가 담긴 Sample2VO
+ * @return 등록 결과
+ * @exception Exception
+ */
+ public String insertSample2(Sample2VO vo) throws Exception {
+ LOGGER.debug(vo.toString());
+
+ /** ID Generation Service */
+ //TODO 해당 테이블 속성에 따라 ID 제너레이션 서비스 사용
+ //String id = egovIdGnrService.getNextStringId();
+ //vo.setId(id);
+ LOGGER.debug(vo.toString());
+
+ sample2DAO.insertSample2(vo);
+ //TODO 해당 테이블 정보에 맞게 수정
+ return null;
+ }
+
+ /**
+ * SAMPLE2을 수정한다.
+ * @param vo - 수정할 정보가 담긴 Sample2VO
+ * @return void형
+ * @exception Exception
+ */
+ public void updateSample2(Sample2VO vo) throws Exception {
+ sample2DAO.updateSample2(vo);
+ }
+
+ /**
+ * SAMPLE2을 삭제한다.
+ * @param vo - 삭제할 정보가 담긴 Sample2VO
+ * @return void형
+ * @exception Exception
+ */
+ public void deleteSample2(Sample2VO vo) throws Exception {
+ sample2DAO.deleteSample2(vo);
+ }
+
+ /**
+ * SAMPLE2을 조회한다.
+ * @param vo - 조회할 정보가 담긴 Sample2VO
+ * @return 조회한 SAMPLE2
+ * @exception Exception
+ */
+ public Sample2VO selectSample2(Sample2VO vo) throws Exception {
+ Sample2VO resultVO = sample2DAO.selectSample2(vo);
+ if (resultVO == null)
+ throw processException("info.nodata.msg");
+ return resultVO;
+ }
+
+ /**
+ * SAMPLE2 목록을 조회한다.
+ * @param searchVO - 조회할 정보가 담긴 VO
+ * @return SAMPLE2 목록
+ * @exception Exception
+ */
+ public List> selectSample2List(Sample2DefaultVO searchVO) throws Exception {
+ return sample2DAO.selectSample2List(searchVO);
+ }
+
+ /**
+ * SAMPLE2 총 갯수를 조회한다.
+ * @param searchVO - 조회할 정보가 담긴 VO
+ * @return SAMPLE2 총 갯수
+ * @exception
+ */
+ public int selectSample2ListTotCnt(Sample2DefaultVO searchVO) {
+ return sample2DAO.selectSample2ListTotCnt(searchVO);
+ }
+
+}
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesResult/crud/java/pkg/service/impl/Sample2DAO.jav b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesResult/crud/java/pkg/service/impl/Sample2DAO.jav
new file mode 100644
index 000000000..6397de2f7
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesResult/crud/java/pkg/service/impl/Sample2DAO.jav
@@ -0,0 +1,87 @@
+package pkg.service.impl;
+
+import java.util.List;
+
+import org.springframework.stereotype.Repository;
+
+import org.egovframe.rte.psl.dataaccess.EgovAbstractMapper;
+import pkg.service.Sample2VO;
+import pkg.service.Sample2DefaultVO;
+
+/**
+ * @Class Name : Sample2DAO.java
+ * @Description : Sample2 DAO Class
+ * @Modification Information
+ *
+ * @author 홍길동
+ * @since 실행환경 개발팀
+ * @version 1.0
+ * @see
+ *
+ * Copyright (C) All right reserved.
+ */
+
+@Repository("sample2DAO")
+public class Sample2DAO extends EgovAbstractMapper {
+
+ /**
+ * SAMPLE2을 등록한다.
+ * @param vo - 등록할 정보가 담긴 Sample2VO
+ * @return 등록 결과
+ * @exception Exception
+ */
+ public void insertSample2(Sample2VO vo) throws Exception {
+ insert("sample2DAO.insertSample2", vo);
+ }
+
+ /**
+ * SAMPLE2을 수정한다.
+ * @param vo - 수정할 정보가 담긴 Sample2VO
+ * @return void형
+ * @exception Exception
+ */
+ public void updateSample2(Sample2VO vo) throws Exception {
+ update("sample2DAO.updateSample2", vo);
+ }
+
+ /**
+ * SAMPLE2을 삭제한다.
+ * @param vo - 삭제할 정보가 담긴 Sample2VO
+ * @return void형
+ * @exception Exception
+ */
+ public void deleteSample2(Sample2VO vo) throws Exception {
+ delete("sample2DAO.deleteSample2", vo);
+ }
+
+ /**
+ * SAMPLE2을 조회한다.
+ * @param vo - 조회할 정보가 담긴 Sample2VO
+ * @return 조회한 SAMPLE2
+ * @exception Exception
+ */
+ public Sample2VO selectSample2(Sample2VO vo) throws Exception {
+ return (Sample2VO) selectOne("sample2DAO.selectSample2", vo);
+ }
+
+ /**
+ * SAMPLE2 목록을 조회한다.
+ * @param searchMap - 조회할 정보가 담긴 List
+ * @return SAMPLE2 목록
+ * @exception Exception
+ */
+ public List selectSample2List(Sample2DefaultVO searchVO) throws Exception {
+ return selectList("sample2DAO.selectSample2List", searchVO);
+ }
+
+ /**
+ * SAMPLE2 총 갯수를 조회한다.
+ * @param searchMap - 조회할 정보가 담긴 Map
+ * @return SAMPLE2 총 갯수
+ * @exception
+ */
+ public int selectSample2ListTotCnt(Sample2DefaultVO searchVO) {
+ return (Integer)selectOne("sample2DAO.selectSample2ListTotCnt", searchVO);
+ }
+
+}
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesResult/crud/java/pkg/web/EgovSample2Controller.jav b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesResult/crud/java/pkg/web/EgovSample2Controller.jav
new file mode 100644
index 000000000..79f545e04
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesResult/crud/java/pkg/web/EgovSample2Controller.jav
@@ -0,0 +1,140 @@
+package pkg.web;
+
+import java.util.List;
+
+import javax.annotation.Resource;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.SessionAttributes;
+import org.springframework.web.bind.support.SessionStatus;
+
+import org.egovframe.rte.fdl.property.EgovPropertyService;
+import org.egovframe.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
+
+import pkg.service.Sample2Service;
+import pkg.service.Sample2DefaultVO;
+import pkg.service.Sample2VO;
+
+/**
+ * @Class Name : Sample2Controller.java
+ * @Description : Sample2 Controller class
+ * @Modification Information
+ *
+ * @author 홍길동
+ * @since 실행환경 개발팀
+ * @version 1.0
+ * @see
+ *
+ * Copyright (C) All right reserved.
+ */
+
+@Controller
+@SessionAttributes(types=Sample2VO.class)
+public class Sample2Controller {
+
+ @Resource(name = "sample2Service")
+ private Sample2Service sample2Service;
+
+ /** EgovPropertyService */
+ @Resource(name = "propertiesService")
+ protected EgovPropertyService propertiesService;
+
+ /**
+ * SAMPLE2 목록을 조회한다. (pageing)
+ * @param searchVO - 조회할 정보가 담긴 Sample2DefaultVO
+ * @return "/sample2/Sample2List"
+ * @exception Exception
+ */
+ @RequestMapping(value="/sample2/Sample2List.do")
+ public String selectSample2List(@ModelAttribute("searchVO") Sample2DefaultVO searchVO,
+ ModelMap model)
+ throws Exception {
+
+ /** EgovPropertyService.sample */
+ searchVO.setPageUnit(propertiesService.getInt("pageUnit"));
+ searchVO.setPageSize(propertiesService.getInt("pageSize"));
+
+ /** pageing */
+ PaginationInfo paginationInfo = new PaginationInfo();
+ paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
+ paginationInfo.setRecordCountPerPage(searchVO.getPageUnit());
+ paginationInfo.setPageSize(searchVO.getPageSize());
+
+ searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
+ searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
+ searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
+
+ List> sample2List = sample2Service.selectSample2List(searchVO);
+ model.addAttribute("resultList", sample2List);
+
+ int totCnt = sample2Service.selectSample2ListTotCnt(searchVO);
+ paginationInfo.setTotalRecordCount(totCnt);
+ model.addAttribute("paginationInfo", paginationInfo);
+
+ return "/sample2/Sample2List";
+ }
+
+ @RequestMapping("/sample2/addSample2View.do")
+ public String addSample2View(
+ @ModelAttribute("searchVO") Sample2DefaultVO searchVO, Model model)
+ throws Exception {
+ model.addAttribute("sample2VO", new Sample2VO());
+ return "/sample2/Sample2Register";
+ }
+
+ @RequestMapping("/sample2/addSample2.do")
+ public String addSample2(
+ Sample2VO sample2VO,
+ @ModelAttribute("searchVO") Sample2DefaultVO searchVO, SessionStatus status)
+ throws Exception {
+ sample2Service.insertSample2(sample2VO);
+ status.setComplete();
+ return "forward:/sample2/Sample2List.do";
+ }
+
+ @RequestMapping("/sample2/updateSample2View.do")
+ public String updateSample2View(
+ @RequestParam("id") String id ,
+ @ModelAttribute("searchVO") Sample2DefaultVO searchVO, Model model)
+ throws Exception {
+ Sample2VO sample2VO = new Sample2VO();
+ sample2VO.setId(id);
+ // 변수명은 CoC 에 따라 sample2VO
+ model.addAttribute(selectSample2(sample2VO, searchVO));
+ return "/sample2/Sample2Register";
+ }
+
+ @RequestMapping("/sample2/selectSample2.do")
+ public @ModelAttribute("sample2VO")
+ Sample2VO selectSample2(
+ Sample2VO sample2VO,
+ @ModelAttribute("searchVO") Sample2DefaultVO searchVO) throws Exception {
+ return sample2Service.selectSample2(sample2VO);
+ }
+
+ @RequestMapping("/sample2/updateSample2.do")
+ public String updateSample2(
+ Sample2VO sample2VO,
+ @ModelAttribute("searchVO") Sample2DefaultVO searchVO, SessionStatus status)
+ throws Exception {
+ sample2Service.updateSample2(sample2VO);
+ status.setComplete();
+ return "forward:/sample2/Sample2List.do";
+ }
+
+ @RequestMapping("/sample2/deleteSample2.do")
+ public String deleteSample2(
+ Sample2VO sample2VO,
+ @ModelAttribute("searchVO") Sample2DefaultVO searchVO, SessionStatus status)
+ throws Exception {
+ sample2Service.deleteSample2(sample2VO);
+ status.setComplete();
+ return "forward:/sample2/Sample2List.do";
+ }
+
+}
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesResult/crud/jsp/pkg/egovSample2List.jsp b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesResult/crud/jsp/pkg/egovSample2List.jsp
new file mode 100644
index 000000000..50b88e954
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesResult/crud/jsp/pkg/egovSample2List.jsp
@@ -0,0 +1,113 @@
+<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
+<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
+<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
+<%
+ /**
+ * @Class Name : Sample2List.jsp
+ * @Description : Sample2 List 화면
+ * @Modification Information
+ *
+ * @author 홍길동
+ * @since 실행환경 개발팀
+ * @version 1.0
+ * @see
+ *
+ * Copyright (C) All right reserved.
+ */
+%>
+
+
+
+
+목록
+
+
+
+
+
+
+
+
+
+
+ List
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Id
+ Name
+ Description
+ UseYn
+ RegUser
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesResult/crud/jsp/pkg/egovSample2Register.jsp b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesResult/crud/jsp/pkg/egovSample2Register.jsp
new file mode 100644
index 000000000..547d36aa5
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesResult/crud/jsp/pkg/egovSample2Register.jsp
@@ -0,0 +1,150 @@
+<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
+<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
+<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
+<%
+ /**
+ * @Class Name : Sample2Register.jsp
+ * @Description : Sample2 Register 화면
+ * @Modification Information
+ *
+ * @author 홍길동
+ * @since 실행환경 개발팀
+ * @version 1.0
+ * @see
+ *
+ * Copyright (C) All right reserved.
+ */
+%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ID *
+
+
+
+
+
+
+
+ ID *
+
+
+
+
+
+
+ ID
+
+
+
+
+
+
+ NAME
+
+
+
+
+
+
+ DESCRIPTION
+
+
+
+
+
+
+ USE_YN
+
+
+
+
+
+
+ REG_USER
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesResult/crud/resource/pkg/EgovSample_Sample2_MAPPER.xml b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesResult/crud/resource/pkg/EgovSample_Sample2_MAPPER.xml
new file mode 100644
index 000000000..c96e109c0
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesResult/crud/resource/pkg/EgovSample_Sample2_MAPPER.xml
@@ -0,0 +1,99 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SELECT
+ ID
+ , NAME
+ , DESCRIPTION
+ , USE_YN
+ , REG_USER
+ FROM SAMPLE2
+ WHERE 1=1
+
+ AND
+ ID = #{searchKeyword}
+
+ AND
+ NAME LIKE CONCAT('%',#{searchKeyword},'%')
+
+
+ ORDER BY
+ ID DESC
+ limit #{recordCountPerPage} offset #{firstIndex}
+
+
+ SELECT COUNT(*) totcnt
+ FROM SAMPLE2
+ WHERE 1=1
+
+ AND
+ ID = #{searchKeyword}
+
+ AND
+ NAME LIKE CONCAT('%',#{searchKeyword},'%')
+
+
+
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesResult/crud/resource/pkg/EgovSample_Sample2_SQL_OLD.xml b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesResult/crud/resource/pkg/EgovSample_Sample2_SQL_OLD.xml
new file mode 100644
index 000000000..0d39b9728
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesResult/crud/resource/pkg/EgovSample_Sample2_SQL_OLD.xml
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SELECT
+ ID
+ , NAME
+ , DESCRIPTION
+ , USE_YN
+ , REG_USER
+ FROM SAMPLE2
+ WHERE 1=1
+
+ ID = #searchKeyword#
+
+
+ NAME LIKE CONCAT('%',#searchKeyword#,'%')
+
+ ORDER BY
+ ID DESC
+ limit #firstIndex#, #recordCountPerPage#
+
+
+ SELECT COUNT(*) totcnt
+ FROM SAMPLE2
+ WHERE 1=1
+
+ ID = #searchKeyword#
+
+
+ NAME LIKE CONCAT('%',#searchKeyword#,'%')
+
+
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/cache/context-cache.xm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/cache/context-cache.xm
index 2931b48ba..a52475e46 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/cache/context-cache.xm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/cache/context-cache.xm
@@ -1,14 +1,26 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:cache="http://www.springframework.org/schema/cache"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
+ http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache-4.0.xsd">
-
+
+
+
-
+
-
+
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/datasource/datasource.xm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/datasource/datasource.xm
index c50b80ea9..880f8b3ae 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/datasource/datasource.xm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/datasource/datasource.xm
@@ -1,10 +1,10 @@
-
+
-
+
@@ -22,4 +22,17 @@
by allowing multiple operations to be performed simultaneously -->
+
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/idGeneration/sequenceId.xm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/idGeneration/sequenceId.xm
index d4ecc131b..cec637aa1 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/idGeneration/sequenceId.xm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/idGeneration/sequenceId.xm
@@ -1,11 +1,12 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">
-
-
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/idGeneration/tableId.xm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/idGeneration/tableId.xm
index 335da88f1..c158655ae 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/idGeneration/tableId.xm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/idGeneration/tableId.xm
@@ -1,14 +1,14 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">
-
-
-
-
-
-
+
+
+
+
+
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/idGeneration/uuId.xm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/idGeneration/uuId.xm
index 4c795e676..f1ee6dd89 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/idGeneration/uuId.xm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/idGeneration/uuId.xm
@@ -1,9 +1,9 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">
-
-
-
-
\ No newline at end of file
+
+
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/logging/console.xm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/logging/console.xm
index 90107bbbe..74c4d2305 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/logging/console.xm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/logging/console.xm
@@ -1,21 +1,23 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/logging/file.xm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/logging/file.xm
index eb5744791..ca7c776c5 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/logging/file.xm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/logging/file.xm
@@ -1,23 +1,23 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/logging/jdbc.xm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/logging/jdbc.xm
index c632911ca..471a562fb 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/logging/jdbc.xm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/logging/jdbc.xm
@@ -1,23 +1,46 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/logging/rollingFile.xm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/logging/rollingFile.xm
index 5974d02f2..d4ef29993 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/logging/rollingFile.xm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/logging/rollingFile.xm
@@ -1,28 +1,27 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/property/property.xm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/property/property.xm
index 11228468e..b91cb9c3a 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/property/property.xm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/property/property.xm
@@ -1,9 +1,9 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">
-
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/scheduling/beanJob.xm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/scheduling/beanJob.xm
index 6eefdb761..4a19443cc 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/scheduling/beanJob.xm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/scheduling/beanJob.xm
@@ -1,10 +1,9 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">
-
+
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/scheduling/cronTrigger.xm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/scheduling/cronTrigger.xm
index eb0e04cd9..605f69b3a 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/scheduling/cronTrigger.xm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/scheduling/cronTrigger.xm
@@ -1,9 +1,9 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">
-
+
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/scheduling/methodJob.xm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/scheduling/methodJob.xm
index c7b7c1abe..240731861 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/scheduling/methodJob.xm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/scheduling/methodJob.xm
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/scheduling/scheduler.xm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/scheduling/scheduler.xm
index 6557c96fe..a93c802f0 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/scheduling/scheduler.xm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/scheduling/scheduler.xm
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/scheduling/simpleTrigger.xm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/scheduling/simpleTrigger.xm
index ccaab76bc..fe6073005 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/scheduling/simpleTrigger.xm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/scheduling/simpleTrigger.xm
@@ -1,12 +1,12 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">
-
+
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/transaction/jpa.xm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/transaction/jpa.xm
index 47fcfda62..aa7f14a0e 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/transaction/jpa.xm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/transaction/jpa.xm
@@ -1,16 +1,61 @@
+ xmlns:context="http://www.springframework.org/schema/context"
+ xmlns:aop="http://www.springframework.org/schema/aop"
+ xmlns:tx="http://www.springframework.org/schema/tx"
+ xmlns:jpa="http://www.springframework.org/schema/data/jpa"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
+ http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
+ http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
+ http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.0.xsd">
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ${cmbDialect}
+ true
+ true
+ 5
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/transaction/jta.xm b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/transaction/jta.xm
index 77f39522b..342bf4257 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/transaction/jta.xm
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTarget/transaction/jta.xm
@@ -1,19 +1,36 @@
-
+ xmlns:aop="http://www.springframework.org/schema/aop"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
+ http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
+ http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
- java.naming.factory.initial=factory
- java.naming.provider.url=http://localhost/
-
-
+
+
+
+
+
+
diff --git a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTestValue/logging/jdbc.properties b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTestValue/logging/jdbc.properties
index c4a48a2b7..6deba704b 100644
--- a/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTestValue/logging/jdbc.properties
+++ b/egovframework.dev.imp.templates/src/main/resources/eGovFrameTemplatesTestValue/logging/jdbc.properties
@@ -3,4 +3,7 @@ txtDriver=hsql.driver
txtUrl=hsql://localhost
txtUser=sa
txtPasswd=1
-txtQuery=insert into STMR_LOG (msg) values('%d %p [%c] - <%m>%n')
\ No newline at end of file
+txtQuery=insert into STMR_LOG (msg) values('%d %p [%c] - <%m>%n')
+
+#rdoConnectionType=ConnectionFactory
+rdoConnectionType=DriverManager
diff --git a/egovframework.dev.imp.templates/src/test/java/pkg/service/Sample2DefaultVO.java b/egovframework.dev.imp.templates/src/test/java/pkg/service/Sample2DefaultVO.java
new file mode 100644
index 000000000..5722d5afe
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/test/java/pkg/service/Sample2DefaultVO.java
@@ -0,0 +1,125 @@
+package pkg.service;
+
+import java.io.Serializable;
+
+/**
+ * Sample2 Default VO class
+ *
+ * @author 홍길동
+ * @since 실행환경 개발팀
+ * @version 1.0
+ * @see
+ *
+ *
+ * == 개정이력(Modification Information) ==
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 실행환경 개발팀 홍길동 최초 생성
+ *
+ *
+ */
+public class Sample2DefaultVO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /** 검색조건 */
+ private String searchCondition = "";
+
+ /** 검색Keyword */
+ private String searchKeyword = "";
+
+ /** 검색사용여부 */
+ private String searchUseYn = "";
+
+ /** 현재페이지 */
+ private int pageIndex = 1;
+
+ /** 페이지갯수 */
+ private int pageUnit = 10;
+
+ /** 페이지사이즈 */
+ private int pageSize = 10;
+
+ /** firstIndex */
+ private int firstIndex = 1;
+
+ /** lastIndex */
+ private int lastIndex = 1;
+
+ /** recordCountPerPage */
+ private int recordCountPerPage = 10;
+
+ public int getFirstIndex() {
+ return firstIndex;
+ }
+
+ public void setFirstIndex(int firstIndex) {
+ this.firstIndex = firstIndex;
+ }
+
+ public int getLastIndex() {
+ return lastIndex;
+ }
+
+ public void setLastIndex(int lastIndex) {
+ this.lastIndex = lastIndex;
+ }
+
+ public int getRecordCountPerPage() {
+ return recordCountPerPage;
+ }
+
+ public void setRecordCountPerPage(int recordCountPerPage) {
+ this.recordCountPerPage = recordCountPerPage;
+ }
+
+ public String getSearchCondition() {
+ return searchCondition;
+ }
+
+ public void setSearchCondition(String searchCondition) {
+ this.searchCondition = searchCondition;
+ }
+
+ public String getSearchKeyword() {
+ return searchKeyword;
+ }
+
+ public void setSearchKeyword(String searchKeyword) {
+ this.searchKeyword = searchKeyword;
+ }
+
+ public String getSearchUseYn() {
+ return searchUseYn;
+ }
+
+ public void setSearchUseYn(String searchUseYn) {
+ this.searchUseYn = searchUseYn;
+ }
+
+ public int getPageIndex() {
+ return pageIndex;
+ }
+
+ public void setPageIndex(int pageIndex) {
+ this.pageIndex = pageIndex;
+ }
+
+ public int getPageUnit() {
+ return pageUnit;
+ }
+
+ public void setPageUnit(int pageUnit) {
+ this.pageUnit = pageUnit;
+ }
+
+ public int getPageSize() {
+ return pageSize;
+ }
+
+ public void setPageSize(int pageSize) {
+ this.pageSize = pageSize;
+ }
+
+}
diff --git a/egovframework.dev.imp.templates/src/test/java/pkg/service/Sample2VO.java b/egovframework.dev.imp.templates/src/test/java/pkg/service/Sample2VO.java
new file mode 100644
index 000000000..d0de13822
--- /dev/null
+++ b/egovframework.dev.imp.templates/src/test/java/pkg/service/Sample2VO.java
@@ -0,0 +1,79 @@
+package pkg.service;
+
+/**
+ * Sample2 VO class
+ *
+ * @author 홍길동
+ * @since 실행환경 개발팀
+ * @version 1.0
+ * @see
+ *
+ *
+ * == 개정이력(Modification Information) ==
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 실행환경 개발팀 홍길동 최초 생성
+ *
+ *
+ */
+public class Sample2VO extends Sample2DefaultVO {
+
+ private static final long serialVersionUID = 1L;
+
+ /** ID */
+ private String id;
+
+ /** NAME */
+ private String name;
+
+ /** DESCRIPTION */
+ private String description;
+
+ /** USE_YN */
+ private String useYn;
+
+ /** REG_USER */
+ private String regUser;
+
+ public String getId() {
+ return this.id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getUseYn() {
+ return this.useYn;
+ }
+
+ public void setUseYn(String useYn) {
+ this.useYn = useYn;
+ }
+
+ public String getRegUser() {
+ return this.regUser;
+ }
+
+ public void setRegUser(String regUser) {
+ this.regUser = regUser;
+ }
+
+}
diff --git a/egovframework.dev.imp.templates/src/test/java/test/CrudCodeGenTest.java b/egovframework.dev.imp.templates/src/test/java/test/CrudCodeGenTest.java
index 38472b0fe..8cc18b6f0 100644
--- a/egovframework.dev.imp.templates/src/test/java/test/CrudCodeGenTest.java
+++ b/egovframework.dev.imp.templates/src/test/java/test/CrudCodeGenTest.java
@@ -9,221 +9,246 @@
import java.util.ArrayList;
import java.util.List;
-import model.Attribute;
-import model.DataModelContext;
-import model.Entity;
-import operation.CrudCodeGen;
-
import org.incava.util.diff.Diff;
import org.incava.util.diff.Difference;
import org.junit.Before;
import org.junit.Test;
+import egovframework.dev.imp.codegen.template.model.Attribute;
+import egovframework.dev.imp.codegen.template.model.DataModelContext;
+import egovframework.dev.imp.codegen.template.model.Entity;
+import operation.CrudCodeGen;
+import operation.CrudCodeGen.CrudWizard;
+
public class CrudCodeGenTest {
private CrudCodeGen crudCodeGen;
private DataModelContext dataModel;
+ private CrudWizard crudWizard;
+
@Before
- public void setUp() throws Exception {
+ public void setUp() {
crudCodeGen = new CrudCodeGen();
-
+
dataModel = new DataModelContext();
-
- dataModel.setPackageName("pkg");
- dataModel.setAuthor("홍길동");
- dataModel.setTeam("실행환경 개발팀");
- dataModel.setCreateDate("2009.02.01");
-
+
+// dataModel.setPackageName("pkg");
+// dataModel.setAuthor("홍길동");
+// dataModel.setTeam("실행환경 개발팀");
+// dataModel.setCreateDate("2009.02.01");
+
+ crudWizard = new CrudWizard();
+ crudWizard.setAuthor("홍길동");
+ crudWizard.setCreateDate("실행환경 개발팀");
+ crudWizard.setMapperFolder("2009.02.01");
+ crudWizard.setDaoPackage("pkg.service.impl");
+ crudWizard.setMapperPackage(crudWizard.getDaoPackage());
+ crudWizard.setVoPackage("pkg.service");
+ crudWizard.setServicePackage(crudWizard.getVoPackage());
+ crudWizard.setImplPackage(crudWizard.getDaoPackage());
+ crudWizard.setControllerPackage("pkg.web");
+ crudWizard.setJspFolder("WEB-INF/jsp/pkg");
+
+ dataModel.setVender("MySql");// HSQLDB, Oracle, MySql, postgres
+
Entity entity = new Entity("SAMPLE2");
-
+
dataModel.setEntity(entity);
-
+
List attributes = new ArrayList();
List primaryKeys = new ArrayList();
-
+
Attribute attr = new Attribute("ID");
attr.setJavaType("String");
attributes.add(attr);
primaryKeys.add(attr);
-
+
attr = new Attribute("NAME");
attr.setJavaType("String");
attributes.add(attr);
// primaryKeys.add(attr);
-
+
attr = new Attribute("DESCRIPTION");
attr.setJavaType("String");
attributes.add(attr);
-
+
attr = new Attribute("USE_YN");
attr.setJavaType("String");
attributes.add(attr);
-
+
attr = new Attribute("REG_USER");
attr.setJavaType("String");
attributes.add(attr);
dataModel.setAttributes(attributes);
dataModel.setPrimaryKeys(primaryKeys);
-
+
}
-
- private void genAndDiff(String templateFile, String targetFile) throws Exception {
- String result = crudCodeGen.generate(dataModel, templateFile);
+
+ private void genAndDiff(String templateFile, String targetFile) {
+ String result = crudCodeGen.generate(dataModel, templateFile, crudWizard);
String[] targetLines = readResource(targetFile);
String[] sourceLines = readString(result);
-
- List diffs = (new Diff(sourceLines, targetLines)).diff();
-
-
- for (Difference diff : diffs) {
- int delStart = diff.getDeletedStart();
- int delEnd = diff.getDeletedEnd();
- int addStart = diff.getAddedStart();
- int addEnd = diff.getAddedEnd();
- String from = toString(delStart, delEnd);
- String to = toString(addStart, addEnd);
- String type = delEnd != Difference.NONE && addEnd != Difference.NONE ? "c" : (delEnd == Difference.NONE ? "a" : "d");
-
- System.out.println(from + type + to);
-
- if (delEnd != Difference.NONE) {
- printLines(delStart, delEnd, "<", sourceLines);
- if (addEnd != Difference.NONE) {
- System.out.println("---");
- }
- }
- if (addEnd != Difference.NONE) {
- printLines(addStart, addEnd, ">", targetLines);
- }
- }
-
- assertEquals(diffs.size(), 0);
+
+ List diffs = (new Diff(sourceLines, targetLines)).diff();
+
+ for (Difference diff : diffs) {
+ int delStart = diff.getDeletedStart();
+ int delEnd = diff.getDeletedEnd();
+ int addStart = diff.getAddedStart();
+ int addEnd = diff.getAddedEnd();
+ String from = toString(delStart, delEnd);
+ String to = toString(addStart, addEnd);
+ String type = delEnd != Difference.NONE && addEnd != Difference.NONE ? "c"
+ : (delEnd == Difference.NONE ? "a" : "d");
+
+ System.out.println(from + type + to);
+
+ if (delEnd != Difference.NONE) {
+ printLines(delStart, delEnd, "<", sourceLines);
+ if (addEnd != Difference.NONE) {
+ System.out.println("---");
+ }
+ }
+ if (addEnd != Difference.NONE) {
+ printLines(addStart, addEnd, ">", targetLines);
+ }
+ }
+
+ assertEquals(diffs.size(), 0);
+ }
+
+ @Test
+ public void testMapper() {
+ String templateFile = "eGovFrameTemplates/crud/resource/pkg/EgovSample_Sample2_MAPPER.vm";
+ String targetFile = "eGovFrameTemplatesResult/crud/resource/pkg/EgovSample_Sample2_MAPPER.xml";
+
+ genAndDiff(templateFile, targetFile);
+ }
+
+ @Test
+ public void testSQLMap() {
+ String templateFile = "eGovFrameTemplates/crud/resource/pkg/EgovSample_Sample2_SQL_OLD.vm";
+ String targetFile = "eGovFrameTemplatesResult/crud/resource/pkg/EgovSample_Sample2_SQL_OLD.xml";
+
+ genAndDiff(templateFile, targetFile);
}
@Test
- public void testSQLMap() throws Exception {
- String templateFile = "templates/crud/src/main/resources/pkg/EgovSample_Sample2_SQL.vm";
- String targetFile = "templates/crud/src/main/resources/pkg/EgovSample_Sample2_SQL.xml";
-
+ public void testService() {
+ String templateFile = "eGovFrameTemplates/crud/java/pkg/service/EgovSample2Service.vm";
+ String targetFile = "eGovFrameTemplatesResult/crud/java/pkg/service/EgovSample2Service.jav";
+
genAndDiff(templateFile, targetFile);
- }
-
-
+ }
+
@Test
- public void testService() throws Exception {
- String templateFile = "templates/crud/src/main/java/pkg/service/EgovSample2Service.vm";
- String targetFile = "templates/crud/src/main/java/pkg/service/EgovSample2Service.jav";
-
+ public void testDefaultVO() {
+ String templateFile = "eGovFrameTemplates/crud/java/pkg/service/Sample2DefaultVO.vm";
+ String targetFile = "eGovFrameTemplatesResult/crud/java/pkg/service/Sample2DefaultVO.jav";
+
genAndDiff(templateFile, targetFile);
- }
+ }
+
@Test
- public void testVO() throws Exception {
- String templateFile = "templates/crud/src/main/java/pkg/service/Sample2VO.vm";
- String targetFile = "templates/crud/src/main/java/pkg/service/Sample2VO.jav";
-
+ public void testVO() {
+ String templateFile = "eGovFrameTemplates/crud/java/pkg/service/Sample2VO.vm";
+ String targetFile = "eGovFrameTemplatesResult/crud/java/pkg/service/Sample2VO.jav";
+
genAndDiff(templateFile, targetFile);
- }
+ }
+
@Test
- public void testServiceImpl() throws Exception {
- String templateFile = "templates/crud/src/main/java/pkg/service/impl/EgovSample2ServiceImpl.vm";
- String targetFile = "templates/crud/src/main/java/pkg/service/impl/EgovSample2ServiceImpl.jav";
-
+ public void testServiceImpl() {
+ String templateFile = "eGovFrameTemplates/crud/java/pkg/service/impl/EgovSample2ServiceImpl.vm";
+ String targetFile = "eGovFrameTemplatesResult/crud/java/pkg/service/impl/EgovSample2ServiceImpl.jav";
+
genAndDiff(templateFile, targetFile);
- }
+ }
+
@Test
- public void testDAO() throws Exception {
- String templateFile = "templates/crud/src/main/java/pkg/service/impl/Sample2DAO.vm";
- String targetFile = "templates/crud/src/main/java/pkg/service/impl/Sample2DAO.jav";
-
+ public void testDAO() {
+ String templateFile = "eGovFrameTemplates/crud/java/pkg/service/impl/Sample2DAO.vm";
+ String targetFile = "eGovFrameTemplatesResult/crud/java/pkg/service/impl/Sample2DAO.jav";
+
genAndDiff(templateFile, targetFile);
- }
-
+ }
+
@Test
- public void testController() throws Exception {
- String templateFile = "templates/crud/src/main/java/pkg/web/EgovSample2Controller.vm";
- String targetFile = "templates/crud/src/main/java/pkg/web/EgovSample2Controller.jav";
+ public void testController() {
+ String templateFile = "eGovFrameTemplates/crud/java/pkg/web/EgovSample2Controller.vm";
+ String targetFile = "eGovFrameTemplatesResult/crud/java/pkg/web/EgovSample2Controller.jav";
genAndDiff(templateFile, targetFile);
}
-
+
@Test
- public void testListView() throws Exception {
- String templateFile = "templates/crud/src/webapp/WEB-INF/jsp/pkg/egovSample2List.vm";
- String targetFile = "templates/crud/src/webapp/WEB-INF/jsp/pkg/egovSample2List.jsp";
+ public void testListView() {
+ String templateFile = "eGovFrameTemplates/crud/jsp/pkg/egovSample2List.vm";
+ String targetFile = "eGovFrameTemplatesResult/crud/jsp/pkg/egovSample2List.jsp";
genAndDiff(templateFile, targetFile);
}
-
-
+
@Test
- public void testRegisterView() throws Exception {
- String templateFile = "templates/crud/src/webapp/WEB-INF/jsp/pkg/egovSample2Register.vm";
- String targetFile = "templates/crud/src/webapp/WEB-INF/jsp/pkg/egovSample2Register.jsp";
-
+ public void testRegisterView() {
+ String templateFile = "eGovFrameTemplates/crud/jsp/pkg/egovSample2Register.vm";
+ String targetFile = "eGovFrameTemplatesResult/crud/jsp/pkg/egovSample2Register.jsp";
+
genAndDiff(templateFile, targetFile);
- }
-
-
-
-
-
- protected void printLines(int start, int end, String ind, String[] lines)
- {
- for (int lnum = start; lnum <= end; ++lnum) {
- System.out.println(ind + " " + lines[lnum]);
- }
- }
-
- protected String toString(int start, int end)
- {
- // adjusted, because file lines are one-indexed, not zero.
-
- StringBuffer buf = new StringBuffer();
-
- // match the line numbering from diff(1):
- buf.append(end == Difference.NONE ? start : (1 + start));
-
- if (end != Difference.NONE && start != end) {
- buf.append(",").append(1 + end);
- }
- return buf.toString();
- }
-
- protected String[] readResource(String fileName)
- {
- try {
- InputStream is = getClass().getClassLoader().getResourceAsStream(fileName);
- InputStreamReader sr = new InputStreamReader(is);
- BufferedReader br = new BufferedReader(sr);
- List contents = new ArrayList();
- String in;
- while ((in = br.readLine()) != null) {
- contents.add(in);
- }
- return (String[])contents.toArray(new String[] {});
- }
- catch (Exception e) {
- System.err.println("error reading " + fileName + ": " + e);
- System.exit(1);
- return null;
- }
- }
- protected String[] readString(String data)
- {
- try {
- StringReader sr = new StringReader(data);
- BufferedReader br = new BufferedReader(sr);
- List contents = new ArrayList();
- String in;
- while ((in = br.readLine()) != null) {
- contents.add(in);
- }
- return (String[])contents.toArray(new String[] {});
- }
- catch (Exception e) {
- System.err.println("error reading " + e);
- System.exit(1);
- return null;
- }
- }
+ }
+
+ protected void printLines(int start, int end, String ind, String[] lines) {
+ for (int lnum = start; lnum <= end; ++lnum) {
+ System.out.println(ind + " " + lines[lnum]);
+ }
+ }
+
+ protected String toString(int start, int end) {
+ // adjusted, because file lines are one-indexed, not zero.
+
+ StringBuffer buf = new StringBuffer();
+
+ // match the line numbering from diff(1):
+ buf.append(end == Difference.NONE ? start : (1 + start));
+
+ if (end != Difference.NONE && start != end) {
+ buf.append(",").append(1 + end);
+ }
+ return buf.toString();
+ }
+
+ protected String[] readResource(String fileName) {
+ try {
+ InputStream is = getClass().getClassLoader().getResourceAsStream(fileName);
+ InputStreamReader sr = new InputStreamReader(is);
+ BufferedReader br = new BufferedReader(sr);
+ List contents = new ArrayList();
+ String in;
+ while ((in = br.readLine()) != null) {
+ contents.add(in);
+ }
+ return contents.toArray(new String[] {});
+ } catch (Exception e) {
+ System.err.println("error reading " + fileName + ": " + e);
+ System.exit(1);
+ return null;
+ }
+ }
+
+ protected String[] readString(String data) {
+ try {
+ StringReader sr = new StringReader(data);
+ BufferedReader br = new BufferedReader(sr);
+ List contents = new ArrayList();
+ String in;
+ while ((in = br.readLine()) != null) {
+ contents.add(in);
+ }
+ return contents.toArray(new String[] {});
+ } catch (Exception e) {
+ System.err.println("error reading " + e);
+ System.exit(1);
+ return null;
+ }
+ }
}