소스 동기화

This commit is contained in:
JSYOO 2021-07-23 16:23:41 +09:00
commit e740c21f84
9 changed files with 1198 additions and 1131 deletions

View File

@ -1,94 +1,95 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- uac.service.board.qna_GET.xml --> <!-- uac.service.board.qna_GET.xml -->
<result> <result>
<code>S</code> <code>S</code>
<message>성공적으로 조회되었습니다.</message> <message>성공적으로 조회되었습니다.</message>
<records>10</records> <records>10</records>
<page>1</page> <page>1</page>
<totPages>15</totPages> <totPages>15</totPages>
<record> <record>
<noticeNo>1</noticeNo> <noticeNo>1</noticeNo>
<noticeType>101</noticeType> <noticeType>101</noticeType>
<title>공지사항 테스트</title> <title>공지사항 테스트</title>
<readCount>55</readCount> <readCount>15</readCount>
<regDate>2021-07-19</regDate> <regDate>2021-07-19</regDate>
</record> </record>
<record> <record>
<noticeNo>2</noticeNo> <noticeNo>2</noticeNo>
<noticeType>101</noticeType> <noticeType>101</noticeType>
<title>공지사항 테스트</title> <title>공지사항 테스트</title>
<readCount>55</readCount> <readCount>55</readCount>
<regDate>2021-07-19</regDate> <regDate>2021-07-19</regDate>
</record> </record>
<record> <record>
<noticeNo>3</noticeNo> <noticeNo>3</noticeNo>
<noticeType>101</noticeType> <noticeType>101</noticeType>
<title>공지사항 테스트</title> <title>공지사항 테스트</title>
<readCount>55</readCount> <readCount>55</readCount>
<regDate>2021-07-19</regDate> <regDate>2021-07-19</regDate>
</record> </record>
<record> <record>
<noticeNo>4</noticeNo> <noticeNo>4</noticeNo>
<noticeType>101</noticeType> <noticeType>101</noticeType>
<title>공지사항 테스트</title> <title>공지사항 테스트</title>
<readCount>55</readCount> <readCount>55</readCount>
<regDate>2021-07-19</regDate> <regDate>2021-07-19</regDate>
</record> </record>
<record> <record>
<noticeNo>5</noticeNo> <noticeNo>5</noticeNo>
<noticeType>101</noticeType> <noticeType>101</noticeType>
<title>공지사항 테스트</title> <title>공지사항 테스트</title>
<readCount>55</readCount> <readCount>55</readCount>
<regDate>2021-07-19</regDate> <regDate>2021-07-19</regDate>
</record> </record>
<record> <record>
<noticeNo>6</noticeNo> <noticeNo>6</noticeNo>
<noticeType>101</noticeType> <noticeType>101</noticeType>
<title>공지사항 테스트</title> <title>공지사항 테스트</title>
<readCount>55</readCount> <readCount>55</readCount>
<regDate>2021-07-19</regDate> <regDate>2021-07-19</regDate>
</record> </record>
<record> <record>
<noticeNo>7</noticeNo> <noticeNo>7</noticeNo>
<noticeType>101</noticeType> <noticeType>101</noticeType>
<title>공지사항 테스트</title> <title>공지사항 테스트</title>
<readCount>55</readCount> <readCount>55</readCount>
<regDate>2021-07-19</regDate> <regDate>2021-07-19</regDate>
</record> </record>
<record> <record>
<noticeNo>8</noticeNo> <noticeNo>8</noticeNo>
<noticeType>101</noticeType> <noticeType>101</noticeType>
<title>공지사항 테스트</title> <title>공지사항 테스트</title>
<readCount>55</readCount> <readCount>55</readCount>
<regDate>2021-07-19</regDate> <regDate>2021-07-19</regDate>
</record> </record>
<record> <record>
<noticeNo>9</noticeNo> <noticeNo>9</noticeNo>
<noticeType>101</noticeType> <noticeType>101</noticeType>
<title>공지사항 테스트</title> <title>공지사항 테스트</title>
<readCount>55</readCount> <readCount>55</readCount>
<regDate>2021-07-19</regDate> <regDate>2021-07-19</regDate>
</record> </record>
<record> <record>
<noticeNo>10</noticeNo> <noticeNo>10</noticeNo>
<noticeType>101</noticeType> <noticeType>101</noticeType>
<title>공지사항 테스트</title> <title>공지사항 테스트</title>
<readCount>55</readCount> <readCount>55</readCount>
<regDate>2021-07-19</regDate> <regDate>2021-07-19</regDate>
</record> </record>
<record> <record>
<noticeNo>11</noticeNo> <noticeNo>11</noticeNo>
<noticeType>101</noticeType> <noticeType>101</noticeType>
<title>공지사항 테스트</title> <title>공지사항 테스트</title>
<readCount>55</readCount> <readCount>55</readCount>
<regDate>2021-07-19</regDate> <regDate>2021-07-19</regDate>
</record> </record>
<record> <record>
<noticeNo>12</noticeNo> <noticeNo>12</noticeNo>
<noticeType>101</noticeType> <noticeType>101</noticeType>
<title>공지사항 테스트</title> <title>공지사항 테스트</title>
<readCount>55</readCount> <readCount>55</readCount>
<regDate>2021-07-19</regDate> <regDate>2021-07-19</regDate>
</record> </record>
</result> <end>3333</end>
</result>

789
pom.xml
View File

@ -1,398 +1,391 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>nlib</groupId> <groupId>nlib</groupId>
<artifactId>nlib</artifactId> <artifactId>nlib</artifactId>
<packaging>war</packaging> <packaging>war</packaging>
<version>1.0.0</version> <version>1.0.0</version>
<name>nlib</name> <name>nlib</name>
<url>http://www.egovframe.go.kr</url> <url>http://www.egovframe.go.kr</url>
<licenses> <licenses>
<license> <license>
<name>The Apache Software License, Version 2.0</name> <name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license> </license>
</licenses> </licenses>
<properties> <properties>
<spring.maven.artifact.version>4.3.16.RELEASE</spring.maven.artifact.version> <spring.maven.artifact.version>4.3.16.RELEASE</spring.maven.artifact.version>
<egovframework.rte.version>3.8.0</egovframework.rte.version> <egovframework.rte.version>3.8.0</egovframework.rte.version>
<spring-security.version>4.2.5.RELEASE</spring-security.version> <spring-security.version>4.2.5.RELEASE</spring-security.version>
</properties> </properties>
<repositories> <repositories>
<repository> <repository>
<id>mvn2</id> <id>mvn2</id>
<url>http://repo1.maven.org/maven2/</url> <url>http://repo1.maven.org/maven2/</url>
<releases> <releases>
<enabled>true</enabled> <enabled>true</enabled>
</releases> </releases>
<snapshots> <snapshots>
<enabled>true</enabled> <enabled>true</enabled>
</snapshots> </snapshots>
</repository> </repository>
<repository> <repository>
<id>egovframe</id> <id>egovframe</id>
<url>http://www.egovframe.go.kr/maven/</url> <url>http://www.egovframe.go.kr/maven/</url>
<releases> <releases>
<enabled>true</enabled> <enabled>true</enabled>
</releases> </releases>
<snapshots> <snapshots>
<enabled>false</enabled> <enabled>false</enabled>
</snapshots> </snapshots>
</repository> </repository>
<repository> <repository>
<id>egovframe2</id> <id>egovframe2</id>
<url>http://maven.egovframe.kr:8080/maven/</url> <url>http://maven.egovframe.kr:8080/maven/</url>
<releases> <releases>
<enabled>true</enabled> <enabled>true</enabled>
</releases> </releases>
<snapshots> <snapshots>
<enabled>false</enabled> <enabled>false</enabled>
</snapshots> </snapshots>
</repository> </repository>
</repositories> </repositories>
<dependencies> <dependencies>
<!-- 표준프레임워크 실행환경 --> <!-- 표준프레임워크 실행환경 -->
<dependency> <dependency>
<groupId>egovframework.rte</groupId> <groupId>egovframework.rte</groupId>
<artifactId>egovframework.rte.ptl.mvc</artifactId> <artifactId>egovframework.rte.ptl.mvc</artifactId>
<version>${egovframework.rte.version}</version> <version>${egovframework.rte.version}</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<artifactId>commons-logging</artifactId> <artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId> <groupId>commons-logging</groupId>
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>egovframework.rte</groupId> <groupId>egovframework.rte</groupId>
<artifactId>egovframework.rte.psl.dataaccess</artifactId> <artifactId>egovframework.rte.psl.dataaccess</artifactId>
<version>${egovframework.rte.version}</version> <version>${egovframework.rte.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>egovframework.rte</groupId> <groupId>egovframework.rte</groupId>
<artifactId>egovframework.rte.fdl.idgnr</artifactId> <artifactId>egovframework.rte.fdl.idgnr</artifactId>
<version>${egovframework.rte.version}</version> <version>${egovframework.rte.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>egovframework.rte</groupId> <groupId>egovframework.rte</groupId>
<artifactId>egovframework.rte.fdl.property</artifactId> <artifactId>egovframework.rte.fdl.property</artifactId>
<version>${egovframework.rte.version}</version> <version>${egovframework.rte.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId> <artifactId>servlet-api</artifactId>
<scope>provided</scope> <scope>provided</scope>
<version>2.5</version> <version>2.5</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId> <artifactId>jstl</artifactId>
<version>1.2</version> <version>1.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>taglibs</groupId> <groupId>taglibs</groupId>
<artifactId>standard</artifactId> <artifactId>standard</artifactId>
<version>1.1.2</version> <version>1.1.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.antlr</groupId> <groupId>org.antlr</groupId>
<artifactId>antlr</artifactId> <artifactId>antlr</artifactId>
<version>3.5</version> <version>3.5</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>commons-codec</groupId> <groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId> <artifactId>commons-codec</artifactId>
<version>1.9</version> <version>1.9</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>egovframework.rte</groupId> <groupId>egovframework.rte</groupId>
<artifactId>egovframework.rte.fdl.crypto</artifactId> <artifactId>egovframework.rte.fdl.crypto</artifactId>
<version>${egovframework.rte.version}</version> <version>${egovframework.rte.version}</version>
</dependency> </dependency>
<!-- fileupload --> <!-- fileupload -->
<dependency> <dependency>
<groupId>commons-fileupload</groupId> <groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId> <artifactId>commons-fileupload</artifactId>
<version>1.3.1</version> <version>1.3.1</version>
<!-- <exclusions> <!-- <exclusions>
<exclusion> <exclusion>
<artifactId>commons-io</artifactId> <artifactId>commons-io</artifactId>
<groupId>commons-io</groupId> <groupId>commons-io</groupId>
</exclusion> </exclusion>
</exclusions> --> </exclusions> -->
</dependency> </dependency>
<!-- Spring Security --> <!-- Spring Security -->
<dependency> <dependency>
<groupId>org.springframework.security</groupId> <groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId> <artifactId>spring-security-web</artifactId>
<version>${spring-security.version}</version> <version>${spring-security.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.security</groupId> <groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId> <artifactId>spring-security-core</artifactId>
<version>${spring-security.version}</version> <version>${spring-security.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.security</groupId> <groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId> <artifactId>spring-security-config</artifactId>
<version>${spring-security.version}</version> <version>${spring-security.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.security</groupId> <groupId>org.springframework.security</groupId>
<artifactId>spring-security-taglibs</artifactId> <artifactId>spring-security-taglibs</artifactId>
<version>${spring-security.version}</version> <version>${spring-security.version}</version>
</dependency> </dependency>
<!-- 요소기술 달력을 위한 라이브러리 --> <!-- 요소기술 달력을 위한 라이브러리 -->
<dependency> <dependency>
<groupId>com.ibm.icu</groupId> <groupId>com.ibm.icu</groupId>
<artifactId>icu4j</artifactId> <artifactId>icu4j</artifactId>
<version>53.1</version> <version>53.1</version>
</dependency> </dependency>
<!-- XML-Map 변환 기능을 위한 추가 (DIGITALSHIP KNKIM 2021.06.15)--> <!-- XML/자바객체 변환 (DIGITALSHIP KNKIM 2021.06.21)-->
<dependency> <dependency>
<groupId>com.thoughtworks.xstream</groupId> <groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>xstream</artifactId> <artifactId>jackson-dataformat-xml</artifactId>
<version>1.4.4</version> <version>2.9.0</version>
</dependency> </dependency>
<!-- XML/자바객체 변환 (DIGITALSHIP KNKIM 2021.06.21)--> <!-- 바코드 ZXing (DIGITALSHIP KNKIM 2021.06.25)-->
<dependency> <dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId> <groupId>com.google.zxing</groupId>
<artifactId>jackson-dataformat-xml</artifactId> <artifactId>core</artifactId>
<version>2.9.0</version> <version>3.3.0</version>
</dependency> </dependency>
<dependency>
<!-- 바코드 ZXing (DIGITALSHIP KNKIM 2021.06.25)--> <groupId>com.google.zxing</groupId>
<dependency> <artifactId>javase</artifactId>
<groupId>com.google.zxing</groupId> <version>3.3.0</version>
<artifactId>core</artifactId> </dependency>
<version>3.3.0</version>
</dependency> <!-- ajax (DIGITALSHIP JSYOO 2021.07.12)-->
<dependency> <dependency>
<groupId>com.google.zxing</groupId> <groupId>com.fasterxml.jackson.core</groupId>
<artifactId>javase</artifactId> <artifactId>jackson-core</artifactId>
<version>3.3.0</version> <version>2.7.3</version>
</dependency> </dependency>
<dependency>
<!-- ajax (DIGITALSHIP JSYOO 2021.07.12)--> <groupId>com.fasterxml.jackson.core</groupId>
<dependency> <artifactId>jackson-databind</artifactId>
<groupId>com.fasterxml.jackson.core</groupId> <version>2.7.3</version>
<artifactId>jackson-core</artifactId> </dependency>
<version>2.7.3</version>
</dependency> <!-- Tiles (DIGITALSHIP KNKIM 2021.07.06)-->
<dependency> <dependency>
<groupId>com.fasterxml.jackson.core</groupId> <groupId>org.apache.tiles</groupId>
<artifactId>jackson-databind</artifactId> <artifactId>tiles-extras</artifactId>
<version>2.7.3</version> <version>3.0.8</version>
</dependency> </dependency>
<dependency>
<!-- Tiles (DIGITALSHIP KNKIM 2021.07.06)--> <groupId>org.apache.tiles</groupId>
<dependency> <artifactId>tiles-servlet</artifactId>
<groupId>org.apache.tiles</groupId> <version>3.0.8</version>
<artifactId>tiles-extras</artifactId> </dependency>
<version>3.0.8</version> <dependency>
</dependency> <groupId>org.apache.tiles</groupId>
<dependency> <artifactId>tiles-jsp</artifactId>
<groupId>org.apache.tiles</groupId> <version>3.0.8</version>
<artifactId>tiles-servlet</artifactId> </dependency>
<version>3.0.8</version>
</dependency> <!-- AJAX JSON (DIGITALSHIP KNKIM 2021.07.15)-->
<dependency> <dependency>
<groupId>org.apache.tiles</groupId> <groupId>com.fasterxml.jackson.core</groupId>
<artifactId>tiles-jsp</artifactId> <artifactId>jackson-core</artifactId>
<version>3.0.8</version> <version>2.11.4</version>
</dependency> </dependency>
<dependency>
<!-- AJAX JSON (DIGITALSHIP KNKIM 2021.07.15)--> <groupId>com.fasterxml.jackson.core</groupId>
<dependency> <artifactId>jackson-annotations</artifactId>
<groupId>com.fasterxml.jackson.core</groupId> <version>2.11.4</version>
<artifactId>jackson-core</artifactId> </dependency>
<version>2.11.4</version> <dependency>
</dependency> <groupId>com.fasterxml.jackson.core</groupId>
<dependency> <artifactId>jackson-databind</artifactId>
<groupId>com.fasterxml.jackson.core</groupId> <version>2.11.4</version>
<artifactId>jackson-annotations</artifactId> </dependency>
<version>2.11.4</version>
</dependency> </dependencies>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId> <build>
<artifactId>jackson-databind</artifactId> <defaultGoal>install</defaultGoal>
<version>2.11.4</version> <directory>${basedir}/target</directory>
</dependency> <finalName>${artifactId}-${version}</finalName>
<pluginManagement>
</dependencies> <plugins>
<plugin>
<build> <groupId>org.apache.tomcat.maven</groupId>
<defaultGoal>install</defaultGoal> <artifactId>tomcat7-maven-plugin</artifactId>
<directory>${basedir}/target</directory> <version>2.2</version>
<finalName>${artifactId}-${version}</finalName> <configuration>
<pluginManagement> <port>80</port>
<plugins> <path>/</path>
<plugin> <systemProperties>
<groupId>org.apache.tomcat.maven</groupId> <JAVA_OPTS>-Xms256m -Xmx768m -XX:MaxPermSize=256m</JAVA_OPTS>
<artifactId>tomcat7-maven-plugin</artifactId> </systemProperties>
<version>2.2</version> </configuration>
<configuration> </plugin>
<port>80</port> <plugin>
<path>/</path> <groupId>org.apache.maven.plugins</groupId>
<systemProperties> <artifactId>maven-compiler-plugin</artifactId>
<JAVA_OPTS>-Xms256m -Xmx768m -XX:MaxPermSize=256m</JAVA_OPTS> <configuration>
</systemProperties> <source>1.8</source>
</configuration> <target>1.8</target>
</plugin> <encoding>UTF-8</encoding>
<plugin> </configuration>
<groupId>org.apache.maven.plugins</groupId> </plugin>
<artifactId>maven-compiler-plugin</artifactId> <plugin>
<configuration> <groupId>org.codehaus.mojo</groupId>
<source>1.8</source> <artifactId>hibernate3-maven-plugin</artifactId>
<target>1.8</target> <version>2.1</version>
<encoding>UTF-8</encoding> <configuration>
</configuration> <components>
</plugin> <component>
<plugin> <name>hbm2ddl</name>
<groupId>org.codehaus.mojo</groupId> <implementation>annotationconfiguration</implementation>
<artifactId>hibernate3-maven-plugin</artifactId> </component>
<version>2.1</version> </components>
<configuration> </configuration>
<components> <dependencies>
<component> <dependency>
<name>hbm2ddl</name> <groupId>org.hsqldb</groupId>
<implementation>annotationconfiguration</implementation> <artifactId>hsqldb</artifactId>
</component> <version>2.3.2</version>
</components> </dependency>
</configuration> </dependencies>
<dependencies> </plugin>
<dependency> <!-- EMMA -->
<groupId>org.hsqldb</groupId> <plugin>
<artifactId>hsqldb</artifactId> <groupId>org.codehaus.mojo</groupId>
<version>2.3.2</version> <artifactId>emma-maven-plugin</artifactId>
</dependency> <version>1.0-alpha-3</version>
</dependencies> </plugin>
</plugin> <!-- PMD manven plugin -->
<!-- EMMA --> <plugin>
<plugin> <groupId>org.apache.maven.plugins</groupId>
<groupId>org.codehaus.mojo</groupId> <artifactId>maven-pmd-plugin</artifactId>
<artifactId>emma-maven-plugin</artifactId> <version>3.1</version>
<version>1.0-alpha-3</version> </plugin>
</plugin> </plugins>
<!-- PMD manven plugin --> </pluginManagement>
<plugin> <plugins>
<groupId>org.apache.maven.plugins</groupId> <!-- EMMA -->
<artifactId>maven-pmd-plugin</artifactId> <plugin>
<version>3.1</version> <groupId>org.apache.maven.plugins</groupId>
</plugin> <artifactId>maven-surefire-plugin</artifactId>
</plugins> <configuration>
</pluginManagement> <skipTests>true</skipTests>
<plugins> <forkMode>once</forkMode>
<!-- EMMA --> <reportFormat>xml</reportFormat>
<plugin> <excludes>
<groupId>org.apache.maven.plugins</groupId> <exclude>**/Abstract*.java</exclude>
<artifactId>maven-surefire-plugin</artifactId> <exclude>**/*Suite.java</exclude>
<configuration> </excludes>
<skipTests>true</skipTests> <includes>
<forkMode>once</forkMode> <include>**/*Test.java</include>
<reportFormat>xml</reportFormat> </includes>
<excludes> </configuration>
<exclude>**/Abstract*.java</exclude> </plugin>
<exclude>**/*Suite.java</exclude> <plugin>
</excludes> <groupId>org.codehaus.mojo</groupId>
<includes> <artifactId>emma-maven-plugin</artifactId>
<include>**/*Test.java</include> <inherited>true</inherited>
</includes> </plugin>
</configuration> <!-- JavaDoc -->
</plugin> <plugin>
<plugin> <groupId>org.apache.maven.plugins</groupId>
<groupId>org.codehaus.mojo</groupId> <artifactId>maven-javadoc-plugin</artifactId>
<artifactId>emma-maven-plugin</artifactId> <version>2.9.1</version>
<inherited>true</inherited> </plugin>
</plugin> </plugins>
<!-- JavaDoc --> </build>
<plugin> <reporting>
<groupId>org.apache.maven.plugins</groupId> <outputDirectory>${basedir}/target/site</outputDirectory>
<artifactId>maven-javadoc-plugin</artifactId> <plugins>
<version>2.9.1</version> <plugin>
</plugin> <groupId>org.apache.maven.plugins</groupId>
</plugins> <artifactId>maven-project-info-reports-plugin</artifactId>
</build> <version>2.7</version>
<reporting> <reportSets>
<outputDirectory>${basedir}/target/site</outputDirectory> <reportSet>
<plugins> <id>sunlink</id>
<plugin> <reports>
<groupId>org.apache.maven.plugins</groupId> <report>javadoc</report>
<artifactId>maven-project-info-reports-plugin</artifactId> </reports>
<version>2.7</version> <inherited>true</inherited>
<reportSets> <configuration>
<reportSet> <links>
<id>sunlink</id> <link>http://docs.oracle.com/javase/6/docs/api/</link>
<reports> </links>
<report>javadoc</report> </configuration>
</reports> </reportSet>
<inherited>true</inherited> </reportSets>
<configuration> </plugin>
<links> <!-- JUnit Test Results & EMMA Coverage Reporting -->
<link>http://docs.oracle.com/javase/6/docs/api/</link> <plugin>
</links> <groupId>org.codehaus.mojo</groupId>
</configuration> <artifactId>emma-maven-plugin</artifactId>
</reportSet> <inherited>true</inherited>
</reportSets> </plugin>
</plugin> <plugin>
<!-- JUnit Test Results & EMMA Coverage Reporting --> <groupId>org.codehaus.mojo</groupId>
<plugin> <artifactId>surefire-report-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId> <inherited>true</inherited>
<artifactId>emma-maven-plugin</artifactId> <reportSets>
<inherited>true</inherited> <reportSet>
</plugin> <reports>
<plugin> <report>report-only</report>
<groupId>org.codehaus.mojo</groupId> </reports>
<artifactId>surefire-report-maven-plugin</artifactId> </reportSet>
<inherited>true</inherited> </reportSets>
<reportSets> </plugin>
<reportSet> <!-- Generating JavaDoc Report -->
<reports> <plugin>
<report>report-only</report> <groupId>org.apache.maven.plugins</groupId>
</reports> <artifactId>maven-javadoc-plugin</artifactId>
</reportSet> <configuration>
</reportSets> <minmemory>128m</minmemory>
</plugin> <maxmemory>512m</maxmemory>
<!-- Generating JavaDoc Report --> <encoding>${encoding}</encoding>
<plugin> <docencoding>${encoding}</docencoding>
<groupId>org.apache.maven.plugins</groupId> <charset>${encoding}</charset>
<artifactId>maven-javadoc-plugin</artifactId> </configuration>
<configuration> </plugin>
<minmemory>128m</minmemory> <!-- Generating Java Source in HTML -->
<maxmemory>512m</maxmemory> <plugin>
<encoding>${encoding}</encoding> <groupId>org.apache.maven.plugins</groupId>
<docencoding>${encoding}</docencoding> <artifactId>maven-jxr-plugin</artifactId>
<charset>${encoding}</charset> <configuration>
</configuration> <inputEncoding>${encoding}</inputEncoding>
</plugin> <outputEncoding>${encoding}</outputEncoding>
<!-- Generating Java Source in HTML --> <linkJavadoc>true</linkJavadoc>
<plugin> <javadocDir>apidocs</javadocDir>
<groupId>org.apache.maven.plugins</groupId> </configuration>
<artifactId>maven-jxr-plugin</artifactId> </plugin>
<configuration> </plugins>
<inputEncoding>${encoding}</inputEncoding> </reporting>
<outputEncoding>${encoding}</outputEncoding> </project>
<linkJavadoc>true</linkJavadoc>
<javadocDir>apidocs</javadocDir>
</configuration>
</plugin>
</plugins>
</reporting>
</project>

View File

@ -1,95 +0,0 @@
package nlib.cmm.util;
import java.util.AbstractMap;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import com.thoughtworks.xstream.converters.Converter;
import com.thoughtworks.xstream.converters.MarshallingContext;
import com.thoughtworks.xstream.converters.UnmarshallingContext;
import com.thoughtworks.xstream.io.HierarchicalStreamReader;
import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
/**
* <pre>
* @Class Name : MapEntryConverter.java
*
* @Description : XML 문자열을 Map 객체로 변환 처리
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 6. 22. KNKIM 최초 생성
*
*
* @author 이씨플라자 * DIGITALSHIP KNKIM
* @since 2021. 6. 22.
* @version 1.0
*
*/
public class MapEntryConverter implements Converter {
public boolean canConvert(Class clazz) {
return AbstractMap.class.isAssignableFrom(clazz);
}
public void marshal(Object value, HierarchicalStreamWriter writer, MarshallingContext context) {
AbstractMap map = (AbstractMap) value;
for (Object obj : map.entrySet()) {
Entry entry = (Entry) obj;
Object entryValue = entry.getValue();
if (entryValue instanceof Map) {
writer.startNode(entry.getKey().toString());
marshal(entry.getValue(), writer, context);
writer.endNode();
continue;
}
writer.startNode(entry.getKey().toString());
writer.setValue(entryValue.toString());
writer.endNode();
}
}
public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) {
Map<String, Object> map = new HashMap<String, Object>();
while (reader.hasMoreChildren()) {
reader.moveDown();
if (reader.hasMoreChildren()) {
Map<String, Object> childMap = new HashMap<String, Object>();
map.put(reader.getNodeName(), childMap);
unmarshalHierarchical(reader, context, childMap);
reader.moveUp();
continue;
}
map.put(reader.getNodeName(), reader.getValue());
reader.moveUp();
}
return map;
}
private void unmarshalHierarchical(HierarchicalStreamReader reader, UnmarshallingContext context,
Map<String, Object> map) {
while (reader.hasMoreChildren()) {
reader.moveDown();
if (reader.hasMoreChildren()) {
Map<String, Object> childMap = new HashMap<String, Object>();
map.put(reader.getNodeName(), childMap);
unmarshalHierarchical(reader, context, childMap);
reader.moveUp();
continue;
}
map.put(reader.getNodeName(), reader.getValue());
reader.moveUp();
}
}
}

View File

@ -1,242 +1,235 @@
package nlib.restful.service; package nlib.restful.service;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.http.HttpMethod; import org.springframework.http.HttpMethod;
import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap; import org.springframework.util.MultiValueMap;
import com.thoughtworks.xstream.XStream; import nlib.util.StringUtil;
import nlib.cmm.util.MapEntryConverter; /**
import nlib.util.StringUtil; * <pre>
* @Class Name : DataApiInterface.java
/** *
* <pre> * @Description : DAO에서 상속할 DataApi의 부모 클래스들을 위한 인터페이스
* @Class Name : DataApiInterface.java *
* *
* @Description : DAO에서 상속할 DataApi의 부모 클래스들을 위한 인터페이스 * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
* *
* * </pre>
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021) *
* * @ ------------ -------- ---------------------------
* </pre> * @ 수정일 수정자 수정내용
* * @ ------------ -------- ---------------------------
* @ ------------ -------- --------------------------- * @ 2021. 7. 9. KNKIM 최초 생성
* @ 수정일 수정자 수정내용 *
* @ ------------ -------- --------------------------- *
* @ 2021. 7. 9. KNKIM 최초 생성 * @author 이씨플라자 * DIGITALSHIP KNKIM
* * @since 2021. 7. 9.
* * @version 1.0
* @author 이씨플라자 * DIGITALSHIP KNKIM *
* @since 2021. 7. 9. */
* @version 1.0 public interface DataApiInterface {
*
*/ static final Logger log = LoggerFactory.getLogger(DataApiInterface.class);
public interface DataApiInterface {
/**
static final Logger log = LoggerFactory.getLogger(DataApiInterface.class); * 조회
*
/** * @param reqVO
* 조회 * @return
* */
* @param reqVO public DataApiResVO get(DataApiReqVO reqVO);
* @return
*/ /**
public DataApiResVO get(DataApiReqVO reqVO); * 등록
*
/** * @param reqVO
* 등록 * @return
* */
* @param reqVO public DataApiResVO put(DataApiReqVO reqVO);
* @return
*/ /**
public DataApiResVO put(DataApiReqVO reqVO); * 수정
*
/** * @param reqVO
* 수정 * @return
* */
* @param reqVO public DataApiResVO post(DataApiReqVO reqVO);
* @return
*/ /**
public DataApiResVO post(DataApiReqVO reqVO); * 삭제
*
/** * @param reqVO
* 삭제 * @return
* */
* @param reqVO public DataApiResVO delete (DataApiReqVO reqVO);
* @return
*/ /**
public DataApiResVO delete (DataApiReqVO reqVO); * 실제 RESTful API 서버로 요청을 전송하고, 응답받은 자료를 응답VO에 담아서 리턴한다.
*
/** * @param reqVO
* 실제 RESTful API 서버로 요청을 전송하고, 응답받은 자료를 응답VO에 담아서 리턴한다. * @param method
* * @return
* @param reqVO */
* @param method public DataApiResVO send(DataApiReqVO reqVO, HttpMethod method);
* @return
*/
public DataApiResVO send(DataApiReqVO reqVO, HttpMethod method); /**
* 요청 VO를 Map 형태로 변환한다.
*
/** * @param reqVO
* 요청 VO를 Map 형태로 변환한다. * @return
* */
* @param reqVO public static MultiValueMap<String, String> makeParamMap(DataApiReqVO reqVO) {
* @return
*/ MultiValueMap<String, String> map = new LinkedMultiValueMap<>();
public static MultiValueMap<String, String> makeParamMap(DataApiReqVO reqVO) {
// 공통
MultiValueMap<String, String> map = new LinkedMultiValueMap<>(); map.add("authKey", reqVO.getAuthKey());
map.add("rows", "" + reqVO.getPageRows());
// 공통 map.add("page", "" + reqVO.getPageNo());
map.add("authKey", reqVO.getAuthKey());
map.add("rows", "" + reqVO.getPageRows()); // 추가 정보
map.add("page", "" + reqVO.getPageNo()); if(reqVO.hasInfo()) {
HashMap<String, Object> info = reqVO.getInfo();
// 추가 정보 for(String key : info.keySet()) {
if(reqVO.hasInfo()) { Object val = info.get(key);
HashMap<String, Object> info = reqVO.getInfo(); if(val instanceof HashMap) {
for(String key : info.keySet()) { HashMap<String, String> subInfo = (HashMap)val;
Object val = info.get(key); for(String subKey : subInfo.keySet()) {
if(val instanceof HashMap) { String subVal = subInfo.get(subKey);
HashMap<String, String> subInfo = (HashMap)val; map.add(subKey, subVal);
for(String subKey : subInfo.keySet()) { }
String subVal = subInfo.get(subKey); } else {
map.add(subKey, subVal); map.add(key, (String)val);
} }
} else { }
map.add(key, (String)val); }
}
} // 요청 파라메타 확인
} for(String key : map.keySet()) {
log.debug("MultiValueMap > " + key + "=" + map.get(key));
// 요청 파라메타 확인 }
for(String key : map.keySet()) {
log.debug("MultiValueMap > " + key + "=" + map.get(key)); return map;
} }
return map;
} /**
* 요청전 공통 입력 파라메터를 확인한다.
*
/** * @param reqVO
* 요청전 공통 입력 파라메터를 확인한다. * @return
* * @throws Exception
* @param reqVO */
* @return public static DataApiResVO checkReqCommonParams(DataApiReqVO reqVO) throws Exception {
* @throws Exception
*/ if(reqVO == null) {
public static DataApiResVO checkReqCommonParams(DataApiReqVO reqVO) throws Exception { return new DataApiResVO("ERR_NO_REQ", "데이터송수신 요청객체가 존재하지 않습니다.");
}
if(reqVO == null) {
return new DataApiResVO("ERR_NO_REQ", "데이터송수신 요청객체가 존재하지 않습니다."); if(StringUtil.isEmpty(reqVO.getReqUrl())) {
} return new DataApiResVO("ERR_NO_RURL", "데이터 요청 업무ID에 대한 URL/RUI 정보가 존재하지 않습니다.");
}
if(StringUtil.isEmpty(reqVO.getReqUrl())) { if(StringUtil.isEmpty(reqVO.getAuthKey())) {
return new DataApiResVO("ERR_NO_RURL", "데이터 요청 업무ID에 대한 URL/RUI 정보가 존재하지 않습니다."); return new DataApiResVO("ERR_NO_AUTHKEY", "데이터 요청에 대한 권한키 정보가 존재하지 않습니다.");
} }
if(StringUtil.isEmpty(reqVO.getAuthKey())) {
return new DataApiResVO("ERR_NO_AUTHKEY", "데이터 요청에 대한 권한키 정보가 존재하지 않습니다."); return null;
} }
return null; /**
} * 처리결과 정보를 입력받아 DataApiResVO를 생성한다.
*
/** * @param resultCode
* 처리결과 정보를 입력받아 DataApiResVO를 생성한다. * @param resultMessage
* * @return
* @param resultCode */
* @param resultMessage public static DataApiResVO makeErrorRes(String resultCode, String resultMessage) {
* @return return new DataApiResVO(resultCode, resultMessage);
*/ }
public static DataApiResVO makeErrorRes(String resultCode, String resultMessage) {
return new DataApiResVO(resultCode, resultMessage); /**
} * 응답받은 XML 문자열을 DataApiResVO (내부 Map객체 포함) 객체로 변환하여 리턴한다.
*
/** * @param xmlStr
* 응답받은 XML 문자열을 DataApiResVO (내부 Map객체 포함) 객체로 변환하여 리턴한다. * @return
* */
* @param xmlStr public static DataApiResVO convertXmlToResVO(String xmlStr) {
* @return
*/ DataApiResVO resVO = new DataApiResVO();
public static DataApiResVO convertXmlToResVO(String xmlStr) { Map<String, Object> map = null;
DataApiResVO resVO = new DataApiResVO(); try {
map = XmlConverter.convert(xmlStr);
XStream magicApi = new XStream(); } catch(Exception e) {
magicApi.registerConverter(new MapEntryConverter()); e.printStackTrace();
magicApi.alias("result", Map.class);
resVO.setResultCode("ERR_RES_XML_FORMAT");
Map<String, Object> map = null; resVO.setResultMessage(String.format("올바르지 않은 XML 형식의 응답입니다. : [%s]", xmlStr));
try {
map = (Map<String, Object>) magicApi.fromXML(xmlStr); return resVO;
} catch(Exception e) { }
e.printStackTrace();
// 처리결과 확인
resVO.setResultCode("ERR_RES_XML_FORMAT"); String commonKeyList = "|resulttype|code|message|page|totpages|records|".toLowerCase();
resVO.setResultMessage(String.format("올바르지 않은 XML 형식의 응답입니다. : [%s]", xmlStr)); String lowerKey = null;
for( String key : map.keySet()) {
return resVO;
} lowerKey = key.toLowerCase();
if(commonKeyList.contains("|" + lowerKey + "|")) {
// 처리결과 확인
String commonKeyList = "|resulttype|code|message|page|totpages|records|".toLowerCase(); if(lowerKey.equals("resulttype")) {
String lowerKey = null; String resultType = (String)map.get(key);
for( String key : map.keySet()) { if(!StringUtil.isEmpty(resultType) && resultType.toLowerCase().compareTo("success") == 0) {
resVO.setResultCode("S0000");
lowerKey = key.toLowerCase(); }
if(commonKeyList.contains("|" + lowerKey + "|")) { }
if(lowerKey.equals("resulttype")) { if(lowerKey.equals("code")) {
String resultType = (String)map.get(key); String code = (String)map.get(key);
if(!StringUtil.isEmpty(resultType) && resultType.toLowerCase().compareTo("success") == 0) { int codeInt = 0;
resVO.setResultCode("S0000"); try {
} codeInt = Integer.parseInt(code);
} } catch(Exception e) {
log.error("회신 code 정보를 정수로 변환처리 중 오류가 발생하였습니다." + e.toString());
if(lowerKey.equals("code")) { codeInt = -1;
String code = (String)map.get(key); }
int codeInt = 0;
try { if(codeInt != 0) {
codeInt = Integer.parseInt(code); resVO.setResultCode(String.format("ERR_BIZERR(%s)", code));
} catch(Exception e) { } else {
log.error("회신 code 정보를 정수로 변환처리 중 오류가 발생하였습니다." + e.toString()); resVO.setResultCode("S0000");
codeInt = -1; }
} }
if(codeInt != 0) { if(lowerKey.equals("message")) {
resVO.setResultCode(String.format("ERR_BIZERR(%s)", code)); resVO.setResultMessage((String)map.get(key));
} else { }
resVO.setResultCode("S0000");
} if(lowerKey.equals("page")) {
} resVO.setPageNo(StringUtil.toNumber((String)map.get(key)));
}
if(lowerKey.equals("message")) {
resVO.setResultMessage((String)map.get(key)); if(lowerKey.equals("totpages")) {
} resVO.setPageTotCount(StringUtil.toNumber((String)map.get(key)));
}
if(lowerKey.equals("page")) {
resVO.setPageNo(StringUtil.toNumber((String)map.get(key))); if(lowerKey.equals("records")) {
} resVO.setRecordTotCount(StringUtil.toNumber((String)map.get(key), 0));
}
if(lowerKey.equals("totpages")) { } else {
resVO.setPageTotCount(StringUtil.toNumber((String)map.get(key))); if(resVO.getInfo() == null) resVO.setInfo(new HashMap<String,Object>());
} HashMap<String,Object> info = resVO.getInfo();
info.put(key, map.get(key));
if(lowerKey.equals("records")) { }
resVO.setRecordTotCount(StringUtil.toNumber((String)map.get(key), 0)); }
}
} else { return resVO;
if(resVO.getInfo() == null) resVO.setInfo(new HashMap<String,Object>()); }
HashMap<String,Object> info = resVO.getInfo(); }
info.put(key, map.get(key));
}
}
return resVO;
}
}

View File

@ -1,79 +1,239 @@
package nlib.restful.service; package nlib.restful.service;
import java.io.FileInputStream; import java.io.ByteArrayInputStream;
import java.io.FileNotFoundException; import java.io.FileInputStream;
import java.io.InputStream; import java.io.FileNotFoundException;
import java.util.HashMap; import java.io.InputStream;
import java.util.ArrayList;
import javax.xml.stream.XMLEventReader; import java.util.HashMap;
import javax.xml.stream.XMLInputFactory; import java.util.List;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.events.StartElement; import javax.xml.stream.XMLEventReader;
import javax.xml.stream.events.XMLEvent; import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamException;
public class XmlConverter { import javax.xml.stream.events.StartElement;
import javax.xml.stream.events.XMLEvent;
@SuppressWarnings("restriction")
public static void main(String argv[]) { import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
String inputFile = "C:/iams/workspace/nlib/data/dataxml/uac.service.board.qna.list_GET.xml";
HashMap<String, String> resMap = new HashMap<String, String>(); import nlib.sample.web.SampleEncoderController;
import nlib.util.StringUtil;
try {
// First create a new XMLInputFactory public class XmlConverter {
XMLInputFactory inputFactory = XMLInputFactory.newInstance();
// Setup a new eventReader private static final Logger log = LoggerFactory.getLogger(XmlConverter.class);
InputStream in = new FileInputStream(inputFile);
XMLEventReader eventReader = inputFactory.createXMLEventReader(in); public static HashMap<String, Object> convert(String xmlStr) throws Exception {
// Read the XML document
if(xmlStr == null) return null;
int depth = 0;
StartElement startElement = null; ByteArrayInputStream bIn = new ByteArrayInputStream(xmlStr.getBytes());
HashMap<String, Object> resMap = new HashMap<String, Object>();
while (eventReader.hasNext()) {
XMLEvent event = eventReader.nextEvent(); try {
System.out.println(" -> " + event); XMLInputFactory inputFactory = XMLInputFactory.newInstance();
String elementName = null; XMLEventReader eventReader = inputFactory.createXMLEventReader(bIn);
String elementValue = null;
HashMap<String, String> elementValues = null; resMap = getElementValue("result", eventReader, null);
log.debug("Converting XML to HashMap : Done >> " + resMap);
if (event.isStartElement()) { } catch (XMLStreamException e) {
e.printStackTrace();
startElement = event.asStartElement(); } catch (Exception e) {
e.printStackTrace();
if (startElement.getName().getLocalPart().equals("result")) { }
depth++;
return resMap;
event = eventReader.nextEvent(); }
System.out.println(" > " + event);
/**
// result의 하위 엘리먼트 시작 찾기 * @param rootElementName
while (!event.isStartElement()) { * @param eventReader
event = eventReader.nextEvent(); * @param alreadyRootOpened : 부모 요소 찾기 없이 작업 진행할지 여부. false인 경우, rootElementName 요소를 찾아서 이후 추출 수행
System.out.println(" 하위엘리먼트 시작전: " + event); * @param startElement
} * @return
* @throws Exception
while (!event.isEndElement()) { */
if (event.isCharacters()) { public static HashMap<String, Object> getElementValue(
String content = event.asCharacters().getData(); String rootElementName
System.out.println("content: -" + content + "_"); , XMLEventReader eventReader
} , XMLEvent firstChildElement) throws Exception {
event = eventReader.nextEvent();
System.out.println(" >> " + event); HashMap<String, Object> retMap = new HashMap<String, Object>();
}
try {
event = eventReader.nextEvent();
System.out.println(" >>> " + event); int depth = (firstChildElement == null ? 0 : 1);
StartElement startElement = null;
continue;
} XMLEvent event = firstChildElement;
} String upperElementName = null;
} String elementName = null; //(firstChildElement == null ? null : firstChildElement.asStartElement().getName().getLocalPart());
} catch (FileNotFoundException e) { String content = null;
System.out.println("File not Found: " + inputFile); String elementValue = "";
} catch (XMLStreamException e) { HashMap<String, String> elementValues = null;
e.printStackTrace(); boolean hasSubElements = false;
} boolean isFirst = true;
}
} while (eventReader.hasNext()) {
// 이벤트가 함께 매개변수로 넘어온 경우, 처음 읽기 생략
if(!isFirst || event == null) {
event = eventReader.nextEvent();
}
if(isFirst) isFirst = false;
// 1 레벨 엘리먼트 찾기
if (depth == 0 && event.isStartElement() && event.asStartElement().getName().getLocalPart().equals(rootElementName)) {
depth++;
continue;
}
// 1 레벨 엘리먼트내의 2 레벨 엘리먼트 찾기
if(depth == 1 && elementName == null && event.isStartElement()) {
elementName = event.asStartElement().getName().getLocalPart();
elementValue = "";
elementValues = null;
hasSubElements = false;
depth++;
continue;
}
// 2 레벨 엘리먼트 내용 찾기
if(depth == 2 && elementName != null && event.isCharacters()) {
content = event.asCharacters().getData();
if(StringUtil.isNotEmpty(content)) {
elementValue += content;
}
continue;
}
// 2 레벨 엘리먼트 종료
if(depth == 2 && elementName != null && event.isEndElement()) {
if(!elementName.equals(event.asEndElement().getName().getLocalPart())) {
throw new Exception("XML문의 요소 시작/종료 태그가 일치하지 않습니다. : " + elementName + " 요소가 " + event.asEndElement().getName().getLocalPart() + "로 종료되었습니다.");
}
addValue(retMap, elementName, elementValue);
System.out.println(elementName + " : -" + elementValue + "_");
elementName = null;
elementValue = "";
depth--;
}
// 2 레벨 엘리먼트 > 하위 엘리먼트 존재하는 경우
if(depth == 2 && elementName != null && event.isStartElement()) {
HashMap<String, Object> subMap = getElementValue(elementName, eventReader, event);
addValue(retMap, elementName, subMap);
depth--;
elementName = null;
}
// 1 레벨 엘리먼트 종료된 경우, 돌아가기
if(depth == 1 && elementName == null && event.isEndElement() && rootElementName.equals(event.asEndElement().getName().getLocalPart())) {
depth--;
return retMap;
}
} // while
} catch (XMLStreamException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
System.out.println("END");
return retMap;
}
public static void addValue(HashMap<String, Object> map, String key, Object value) throws Exception {
if(map == null) throw new Exception("값을 넣을 Map 변수가 초기화되지 않았습니다.");
if(key == null) return;
if(value == null) return;
Object curValObj = map.get(key);
if(curValObj == null) {
map.put(key, value);
return;
}
if(curValObj instanceof String || curValObj instanceof HashMap) {
List<Object> values = new ArrayList<Object>();
values.add(curValObj);
values.add(value);
map.put(key, values);
} else if(curValObj instanceof List) {
((ArrayList<Object>)curValObj).add(value);
}
return;
}
/*
public static void main(String argv[]) throws Exception {
XmlConverter xmlConverter = new XmlConverter();
String xmlStr = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\r\n" +
"<!-- uac.service.board.qna_GET.xml -->\r\n" +
"<result>\r\n" +
" <code>S</code>\r\n" +
" <message>성공적으로 조회되었습니다.</message>\r\n" +
" <records>10</records>\r\n" +
" <page>1</page>\r\n" +
" <totPages>15</totPages>\r\n" +
" <record>\r\n" +
" <noticeNo>1</noticeNo>\r\n" +
" <noticeType>101</noticeType>\r\n" +
" <title>공지사항 테스트</title>\r\n" +
" <readCount>15</readCount>\r\n" +
" <regDate>2021-07-19</regDate>\r\n" +
" </record>\r\n" +
" <record>\r\n" +
" <noticeNo>2</noticeNo>\r\n" +
" <noticeType>101</noticeType>\r\n" +
" <title>공지사항 테스트</title>\r\n" +
" <readCount>55</readCount>\r\n" +
" <regDate>2021-07-19</regDate>\r\n" +
" </record>\r\n" +
" <record>\r\n" +
" <noticeNo>3</noticeNo>\r\n" +
" <noticeType>101</noticeType>\r\n" +
" <title>공지사항 테스트</title>\r\n" +
" <readCount>55</readCount>\r\n" +
" <regDate>2021-07-19</regDate>\r\n" +
" </record>\r\n" +
" <record>\r\n" +
" <noticeNo>4</noticeNo>\r\n" +
" <noticeType>101</noticeType>\r\n" +
" <title>공지사항 테스트</title>\r\n" +
" <readCount>55</readCount>\r\n" +
" <regDate>2021-07-19</regDate>\r\n" +
" </record>\r\n" +
" <record>\r\n" +
" <noticeNo>5</noticeNo>\r\n" +
" <noticeType>101</noticeType>\r\n" +
" <title>공지사항 테스트</title>\r\n" +
" <readCount>55</readCount>\r\n" +
" <regDate>2021-07-19</regDate>\r\n" +
" </record>\r\n" +
" <record>\r\n" +
" <noticeNo>6</noticeNo>\r\n" +
" <noticeType>101</noticeType>\r\n" +
" <title>공지사항 테스트</title>\r\n" +
" <readCount>55</readCount>\r\n" +
" <regDate>2021-07-19</regDate>\r\n" +
" </record>\r\n" +
" <end>3333</end>\r\n" +
"</result>";
HashMap<String, Object> resMap = xmlConverter.convert(xmlStr);
}
*/
}

View File

@ -1,107 +1,107 @@
package nlib.security; package nlib.security;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.authentication.AuthenticationProvider; import org.springframework.security.authentication.AuthenticationProvider;
import org.springframework.security.authentication.dao.DaoAuthenticationProvider; import org.springframework.security.authentication.dao.DaoAuthenticationProvider;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.builders.WebSecurity; import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.security.crypto.password.PasswordEncoder;
import nlib.cmm.crypto.NlibPasswordEncoder; import nlib.cmm.crypto.NlibPasswordEncoder;
/** /**
* <pre> * <pre>
* @Class Name : SpringSecurityConfig.java * @Class Name : SpringSecurityConfig.java
* *
* @Description : Spring Security 환경설정 클래스 * @Description : Spring Security 환경설정 클래스
* *
* *
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021) * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
* *
* </pre> * </pre>
* *
* @ ------------ -------- --------------------------- * @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용 * @ 수정일 수정자 수정내용
* @ ------------ -------- --------------------------- * @ ------------ -------- ---------------------------
* @ 2021. 7. 6. KNKIM 최초 생성 * @ 2021. 7. 6. KNKIM 최초 생성
* *
* *
* @author 이씨플라자 * DIGITALSHIP KNKIM * @author 이씨플라자 * DIGITALSHIP KNKIM
* @since 2021. 7. 6. * @since 2021. 7. 6.
* @version 1.0 * @version 1.0
* *
*/ */
@Configuration @Configuration
@EnableWebSecurity @EnableWebSecurity
@EnableGlobalMethodSecurity(securedEnabled = true) @EnableGlobalMethodSecurity(securedEnabled = true)
public class SpringSecurityConfig extends WebSecurityConfigurerAdapter { public class SpringSecurityConfig extends WebSecurityConfigurerAdapter {
@Override @Override
public void configure(WebSecurity web) throws Exception { public void configure(WebSecurity web) throws Exception {
web.ignoring() web.ignoring()
.antMatchers("/resources/**") .antMatchers("/resources/**")
.antMatchers("/css/**") .antMatchers("/css/**")
.antMatchers("/images/**") .antMatchers("/images/**")
.antMatchers("/js/**") .antMatchers("/js/**")
.antMatchers("/temp/**") .antMatchers("/temp/**")
.antMatchers("/favicon/**") .antMatchers("/favicon/**")
.antMatchers("/*/*Ajax.do") .antMatchers("/*/*Ajax.do")
.antMatchers("/board/**") .antMatchers("/board/**")
; ;
} }
@Override @Override
protected void configure(HttpSecurity http) throws Exception { protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests() http.authorizeRequests()
.antMatchers("/login/login*.do").permitAll() .antMatchers("/login/login*.do").permitAll()
.antMatchers("/login/logout*.do").permitAll() .antMatchers("/login/logout*.do").permitAll()
.antMatchers("/login/naver*.do").permitAll() .antMatchers("/login/naver*.do").permitAll()
.antMatchers("/member/*.do").permitAll() .antMatchers("/member/*.do").permitAll()
.antMatchers("/member/*.ajax").permitAll() .antMatchers("/member/*.ajax").permitAll()
.antMatchers("/userInfo/*.do").permitAll() .antMatchers("/userInfo/*.do").permitAll()
.antMatchers("/info/inform/*.do").permitAll() .antMatchers("/info/inform/*.do").permitAll()
.antMatchers("/").permitAll() .antMatchers("/").permitAll()
.antMatchers("/index.jsp").permitAll() .antMatchers("/index.jsp").permitAll()
.antMatchers("/index.do").permitAll() .antMatchers("/index.do").permitAll()
.antMatchers("/main/header.do").permitAll() .antMatchers("/main/header.do").permitAll()
.antMatchers("/main/menu.do").permitAll() .antMatchers("/main/menu.do").permitAll()
.antMatchers("/sample/password/getSampleEncoder.do").permitAll() .antMatchers("/sample/password/getSampleEncoder.do").permitAll()
.anyRequest().authenticated() .anyRequest().authenticated()
.and().formLogin() .and().formLogin()
.loginPage("/login/loginForm.do") .loginPage("/login/loginForm.do")
.permitAll() .permitAll()
.and().csrf() .and().csrf()
.disable(); .disable();
http.logout() http.logout()
.logoutSuccessUrl("/login/loginForm.do?logout") .logoutSuccessUrl("/login/loginForm.do?logout")
.invalidateHttpSession(true).deleteCookies("JSESSIONID") .invalidateHttpSession(true).deleteCookies("JSESSIONID")
; ;
} }
@Bean @Bean
@Override @Override
public AuthenticationManager authenticationManagerBean() throws Exception { public AuthenticationManager authenticationManagerBean() throws Exception {
return super.authenticationManagerBean(); return super.authenticationManagerBean();
} }
@Bean @Bean
public UserDetailsService userDetailsService() { public UserDetailsService userDetailsService() {
return new SecUserDetailsService(); return new SecUserDetailsService();
} }
@Bean @Bean
public PasswordEncoder getPasswordEncoder() { public PasswordEncoder getPasswordEncoder() {
return new NlibPasswordEncoder(); return new NlibPasswordEncoder();
} }
} }

View File

@ -32,56 +32,57 @@ public class NlibLoginVO implements Serializable {
private static final long serialVersionUID = -8274004534207618049L; private static final long serialVersionUID = -8274004534207618049L;
/** 아이디 */ /** 아이디 */
private String id; private String id = null;
/** 이름 */ /** 이름 */
private String name; private String name = null;
/** 주민등록번호 */ /** 주민등록번호 */
private String ihidNum; private String ihidNum = null;
/** 이메일주소 */ /** 이메일주소 */
private String email; private String email = null;
/** 비밀번호 */ /** 비밀번호 */
private String password; private String password = null;
/** 비밀번호 힌트 */ /** 비밀번호 힌트 */
private String passwordHint; private String passwordHint = null;
/** 비밀번호 정답 */ /** 비밀번호 정답 */
private String passwordCnsr; private String passwordCnsr = null;
/** 사용자구분 */ /** 사용자구분 */
private String userSe; private String userSe = null;
/** 조직(부서)ID */ /** 조직(부서)ID */
private String orgnztId; private String orgnztId = null;
/** 조직(부서)명 */ /** 조직(부서)명 */
private String orgnztNm; private String orgnztNm = null;
/** 고유아이디 */ /** 고유아이디 */
private String uniqId; private String uniqId = null;
/** 로그인 후 이동할 페이지 */ /** 로그인 후 이동할 페이지 */
private String url; private String url = null;
/** 사용자 IP정보 */ /** 사용자 IP정보 */
private String ip; private String ip = null;
/** GPKI인증 DN */ /** GPKI인증 DN */
private String dn; private String dn = null;
/** 인증키 */ /** 인증키 */
private String authKey; private String authKey = null;
/** 페이지번호 */ /** 페이지번호 */
private String page; private String page = null;
/** 게시물 수 */ /** 게시물 수 */
private String rows; private String rows = null;
/** 핸드폰 번호 */ /** 핸드폰 번호 */
private String phone; private String phone = null;
/** 우편번호 */ /** 우편번호 */
private String zipNo; private String zipNo = null;
/** 도로명주소 */ /** 도로명주소 */
private String roadAddrPart; private String roadAddrPart = null;
/** 상세주소 */ /** 상세주소 */
private String addrDetail; private String addrDetail = null;
/** 생년월일 */ /** 생년월일 */
private String birthday; private String birthday = null;
/** 생일 년도 */ /** 생일 년도 */
private String birth_yy; private String birth_yy = null;
/** 생일 월 */ /** 생일 월 */
private String birth_mm; private String birth_mm = null;
/** 생일 날짜 */ /** 생일 날짜 */
private String birth_dd; private String birth_dd = null;
public String getAuthKey() { public String getAuthKey() {
return authKey; return authKey;

View File

@ -1,89 +1,99 @@
package nlib.util; package nlib.util;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Locale; import java.util.Locale;
import egovframework.com.utl.fcc.service.EgovStringUtil; import egovframework.com.utl.fcc.service.EgovStringUtil;
/** /**
* <pre> * <pre>
* @Class Name : StringUtil.java * @Class Name : StringUtil.java
* *
* @Description : 문자열 관련 공통 함수 모음 * @Description : 문자열 관련 공통 함수 모음
* *
* *
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021) * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
* *
* </pre> * </pre>
* *
* @ ------------ -------- --------------------------- * @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용 * @ 수정일 수정자 수정내용
* @ ------------ -------- --------------------------- * @ ------------ -------- ---------------------------
* @ 2021. 6. 22. KNKIM 최초 생성 * @ 2021. 6. 22. KNKIM 최초 생성
* *
* *
* @author 이씨플라자 * DIGITALSHIP KNKIM * @author 이씨플라자 * DIGITALSHIP KNKIM
* @since 2021. 6. 22. * @since 2021. 6. 22.
* @version 1.0 * @version 1.0
* *
*/ */
public class StringUtil extends EgovStringUtil { public class StringUtil extends EgovStringUtil {
/** /**
* Null 이거나, 빈문자열(공백 포함) 경우, true를 리턴한다. * Null 이거나, 빈문자열(공백 포함) 경우, true를 리턴한다.
* *
* @param str * @param str
* @return * @return
*/ */
public static boolean isEmpty(String str) { public static boolean isEmpty(String str) {
return str == null || str.trim().length() == 0; return str == null || str.trim().length() == 0;
} }
/** /**
* 문자열을 정수형으로 변환하여 리턴한다. 만일 문자열이 null 또는 문자열인 경우, -1을 리턴한다. * Null이 아니고 빈문자열(공백 포함) 아닌 일반 문자가 존재하는 , true를 리턴한다.
* *
* @param str * @param str
* @return * @return
*/ */
public static int toNumber(String str) { public static boolean isNotEmpty(String str) {
return toNumber(str, -1); return !isEmpty(str);
} }
/** /**
* 문자열을 정수형으로 변환하여 리턴한다. 만일 문자열이 null 또는 문자열인 경우, 기본값 정보 defaultInt를 리턴한다. * 문자열을 정수형으로 변환하여 리턴한다. 만일 문자열이 null 또는 문자열인 경우, -1을 리턴한다.
* *
* @param str * @param str
* @param defaultInt * @return
* @return */
*/ public static int toNumber(String str) {
public static int toNumber(String str, int defaultInt) { return toNumber(str, -1);
if(isEmpty(str)) return defaultInt; }
try { /**
return Integer.parseInt(str.trim()); * 문자열을 정수형으로 변환하여 리턴한다. 만일 문자열이 null 또는 문자열인 경우, 기본값 정보 defaultInt를 리턴한다.
} catch(Exception e) {} *
* @param str
return defaultInt; * @param defaultInt
} * @return
*/
/** public static int toNumber(String str, int defaultInt) {
* 현재 시각을 yyyyMMddhhmmssSSS 형식으로 리턴한다. if(isEmpty(str)) return defaultInt;
*
* @return try {
*/ return Integer.parseInt(str.trim());
public static String getTimeStamp() { } catch(Exception e) {}
String rtnStr = null; return defaultInt;
}
// 문자열로 변환하기 위한 패턴 설정(년도-- :::(자정이후 ))
String pattern = "yyyyMMddhhmmssSSS"; /**
* 현재 시각을 yyyyMMddhhmmssSSS 형식으로 리턴한다.
SimpleDateFormat sdfCurrent = new SimpleDateFormat(pattern, Locale.KOREA); *
Timestamp ts = new Timestamp(System.currentTimeMillis()); * @return
*/
rtnStr = sdfCurrent.format(ts.getTime()); public static String getTimeStamp() {
return rtnStr; String rtnStr = null;
}
} // 문자열로 변환하기 위한 패턴 설정(년도-- :::(자정이후 ))
String pattern = "yyyyMMddhhmmssSSS";
SimpleDateFormat sdfCurrent = new SimpleDateFormat(pattern, Locale.KOREA);
Timestamp ts = new Timestamp(System.currentTimeMillis());
rtnStr = sdfCurrent.format(ts.getTime());
return rtnStr;
}
}

View File

@ -148,7 +148,9 @@ $("#jsGrid").jsGrid({
/* 이하만 설정 */ /* 이하만 설정 */
/*
data: clients, data: clients,
*/
fields: [ fields: [
{ title:"번호", name: "noticeNo" , type: "number" , width: 50, align: "center"}, { title:"번호", name: "noticeNo" , type: "number" , width: 50, align: "center"},
@ -177,8 +179,10 @@ function fn_search_article() {
type: "post", type: "post",
data: JSON.stringify(inputData), data: JSON.stringify(inputData),
dataType:'json', /* Server Response Data Type */ dataType:'json', /* Server Response Data Type */
success: function(returnData, status){ success: function(returnData, status){
alert("returnData=" + JSON.stringify(returnData)); var jsonObj = JSON.parse(returnData);
alert("record=" + JSON.stringify(jsonObj.info.record));
$("#jsGrid").jsGrid("loadData", jsonObj.info.record)
}, },
error: function(data){ error: function(data){
alert("조회에 실패하였습니다.\n" + data.code + " : " + data.message); alert("조회에 실패하였습니다.\n" + data.code + " : " + data.message);