전자정부 표준 프레임워크와 넥사크로 연동하기_1

2021. 8. 22. 23:31·공부/넥사크로
반응형

 

 

먼저 톰캣 경로를 간단하게 바꿔준다.

톰캣 더블클릭

 

Modules 선택

 

 

Path 첫 번째 줄 선택 후 Edit

 

Path에 '/'만 남기고 지운다.

 

저장 후 서버 재실행

좌 : 변경 전,  우 : 변경 후

반응형

 

pom.xml 추가

<!-- ############  NEXACROPLATFORM UIADAPTER17 REPOSITORY  ############ -->
<repository>
  <id>tobesoft</id>
  <url>http://mangosteen.tobesoft.co.kr/nexus/repository/maven-public</url>
  <releases>
    <enabled>true</enabled>
  </releases>
  <snapshots>
    <enabled>true</enabled>
  </snapshots>
</repository>
<!-- ############  NEXACROPLATFORM UIADAPTER17 LIBRARY  ############ -->
<dependency>
  <groupId>com.nexacro.uiadapter17.spring</groupId>
  <artifactId>uiadapter17-spring-core</artifactId>
  <version>1.0.0-SNAPSHOT</version>
  <exclusions>
    <exclusion>
      <groupId>org.springframework</groupId>
      <artifactId>spring-webmvc</artifactId>
    </exclusion>
    <exclusion>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </exclusion>
  </exclusions>
</dependency>
<dependency>
  <groupId>com.nexacro.uiadapter17.spring</groupId>
  <artifactId>uiadapter17-spring-dataaccess</artifactId>
  <version>1.0.0-SNAPSHOT</version>
  <exclusions>
    <exclusion>
      <groupId>org.springframework</groupId>
      <artifactId>spring-webmvc</artifactId>
    </exclusion>
    <exclusion>
      <groupId>org.aspectj</groupId>
      <artifactId>aspectjweaver</artifactId>
    </exclusion>
    <exclusion>
      <groupId>org.apache.ibatis</groupId>
      <artifactId>ibatis-sqlmap</artifactId>
    </exclusion>
    <exclusion>
      <groupId>org.mybatis</groupId>
      <artifactId>mybatis</artifactId>
    </exclusion>
    <exclusion>
      <groupId>org.mybatis</groupId>
      <artifactId>mybatis-spring</artifactId>
    </exclusion>
    <exclusion>
      <groupId>org.springframework</groupId>
      <artifactId>spring-orm</artifactId>
    </exclusion>
  </exclusions>
</dependency>
<dependency>
  <groupId>com.nexacro.uiadapter17.spring</groupId>
  <artifactId>uiadapter17-spring-excel</artifactId>
  <version>1.0.0-SNAPSHOT</version>
  <exclusions>
    <exclusion>
      <groupId>org.springframework</groupId>
      <artifactId>spring-webmvc</artifactId>
    </exclusion>
  </exclusions>
</dependency>

 

pom.xml에 추가 후 저장

 

 

dispatcher-servlet.xml 수정

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:p="http://www.springframework.org/schema/p"
        xmlns:context="http://www.springframework.org/schema/context"
        xmlns:mvc="http://www.springframework.org/schema/mvc"
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-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/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd">

    <context:component-scan base-package="egovframework">
        <context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
        <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Service"/>
        <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Repository"/>
    </context:component-scan>

    <bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter"/>
    <bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping">
        <property name="interceptors">
            <list>
                <ref bean="localeChangeInterceptor" />
            </list>
        </property>
    </bean>
    
    <bean id="localeResolver" class="org.springframework.web.servlet.i18n.SessionLocaleResolver">
      <property name="defaultLocale" value="ko" />
    </bean>
    <bean id="localeChangeInterceptor" class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor">
        <property name="paramName" value="lang" />
    </bean>
    
    <!-- /////////////////////////////////// 넥사크로플랫폼 UIADAPTER17 설정 시작 /////////////////////////////////// -->
    <bean id="nexacroFileView"    class="com.nexacro.uiadapter17.spring.core.view.NexacroFileView" />
    <bean id="nexacroView"        class="com.nexacro.uiadapter17.spring.core.view.NexacroView">
        <property name="defaultContentType" value="PlatformXml" />
        <property name="defaultCharset" value="UTF-8" />
    </bean>
    
    <!-- 넥사크로플랫폼 RequestMappingHandlerAdapter 구현체 등록 -->
    <bean class="com.nexacro.uiadapter17.spring.core.resolve.NexacroRequestMappingHandlerAdapter" p:order="0">
        <property name="customArgumentResolvers">
            <list><bean class="com.nexacro.uiadapter17.spring.core.resolve.NexacroMethodArgumentResolver" /></list>
        </property>
        <property name="customReturnValueHandlers">
            <list>
                <bean class="com.nexacro.uiadapter17.spring.core.resolve.NexacroHandlerMethodReturnValueHandler">
                    <property name="view"     ref="nexacroView" />
                    <property name="fileView" ref="nexacroFileView" />
                </bean>
            </list>
        </property>
    </bean>
    
    <!-- 넥사크로플랫폼 EXCEPTION-RESOLVER 등록 -->
    <bean id="exceptionResolver" class="com.nexacro.uiadapter17.spring.core.resolve.NexacroMappingExceptionResolver" p:order="1">
        <property name="view" ref="nexacroView" />   
        <property name="shouldLogStackTrace" value="true" />   
        <property name="shouldSendStackTrace" value="true" />
        <!-- shouldSendStackTrace 가 false 일 경우 nexacro platform으로 전송되는 에러메시지  -->
        <!-- <property name="defaultErrorMsg" value="An Error Occured. check the ErrorCode for detail of error infomation" /> -->
        <property name="defaultErrorMsg" value="fail.common.msg" />
        <property name="messageSource" ref="messageSource" />   
    </bean>    
    <!-- /////////////////////////////////// 넥사크로플랫폼 UIADAPTER17 설정 끝 /////////////////////////////////// -->
</beans>

 

 

반응형

context-nexacro.xml 생성

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:p="http://www.springframework.org/schema/p" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    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/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
        ">
        
  <bean id="applicationContextProvider" class="com.nexacro.uiadapter17.spring.core.context.ApplicationContextProvider" lazy-init="false" />

  <bean id="hsqlDbms"   class="com.nexacro.uiadapter17.spring.dao.dbms.Hsql" />
<!-- 
  <bean id="oracleDbms" class="com.nexacro.uiadapter17.spring.dao.dbms.Oracle" />
  <bean id="mssqlDbms"  class="com.nexacro.uiadapter17.spring.dao.dbms.Mssql" />
  <bean id="mysqlDbms"  class="com.nexacro.uiadapter17.spring.dao.dbms.Mysql" />
  <bean id="tiberoDbms" class="com.nexacro.uiadapter17.spring.dao.dbms.Tibero" />
 -->  
  <bean id="dbmsProvider" class="com.nexacro.uiadapter17.spring.dao.DbVendorsProvider">
      <property name="dbvendors">
          <map>
           <entry key="HSQL Database Engine" value-ref="hsqlDbms"/>
<!-- 
           <entry key="Oracle"     value-ref="oracleDbms"/>
           <entry key="SQL Server" value-ref="mssqlDbms"/>
           <entry key="MySQL"      value-ref="mysqlDbms"/>
              <entry key="Tibero"     value-ref="tiberoDbms"/>
 -->
          </map>
      </property>
  </bean>
</beans>

 

 

 

sql-mapper-config.xml 추가

  <!-- myBatis Inteceptor for get column information  -->
  <plugins>  
    <!-- NexacroMybatisMetaDataProvider :  Executor Plugin:쿼리를 실행하며, 
        List 형태의 데이터 조회 시 조회된 결과가 0건일 경우 결과 메타데이 터 정보를 조회
        resultType이 Map 일 경우 추가적으로 메타데이터 조회를 위한 쿼리를 실행한다.  -->
    <plugin interceptor="com.nexacro.uiadapter17.spring.dao.mybatis.NexacroMybatisMetaDataProvider" />
    <!-- NexacroMybatisResultSetHandler :ResultSetHandler Plugin – Executor Plugin에서 메타데이터 조회를 위해 쿼리를 실행하였을 경우에만 동작, 
        ResultSetMetaData 와 resultType에 존재하는 필드 정보를 확인하여 메타데이터 정보를 조회 한 다.  -->
    <plugin interceptor="com.nexacro.uiadapter17.spring.dao.mybatis.NexacroMybatisResultSetHandler" />
  </plugins>

 

 

프로젝트 클린 후 서버 실행해서 콘솔에 에러 없는지 확인

 


이전 게시글

 

전자정부 표준 프레임워크 MariaDB 연동

패키지, 파일 생성 MariaDB 테이블 생성, 데이터 추가 # 테이블 생성 CREATE TABLE `tbl_emp` ( `NO` INT(11) NOT NULL COMMENT '사번', `NAME` VARCHAR(50) NULL DEFAULT NULL COMMENT '이름', `JOB` VARCHAR(..

devhan.tistory.com

 

다음 게시글

 

전자정부 표준 프레임워크와 넥사크로 연동하기_2

넥사크로 프로젝트 생성 경로는 이클립스 워크스페이스 src\main에 위치 쭉 Next 클릭 후 Finish 이클립스 상에서 프로젝트 src폴더 Refresh Generate Path 설정 Yes  컴포넌트 배치  Form_Work 클릭 확인..

devhan.tistory.com

 

반응형
저작자표시 비영리 변경금지 (새창열림)
'공부/넥사크로' 카테고리의 다른 글
  • [Nexacro] 넥사크로 N + SpringBoot 연동하기 1 - 프로젝트 생성
  • 전자정부 표준 프레임워크와 넥사크로 연동하기_2
  • 전자정부 표준 프레임워크 MariaDB 연동
  • 전자정부 표준 프레임워크 JSP 연결
데부한
데부한
어차피 할 거면 긍정적으로 하고 싶은 개발자
    반응형
  • 데부한
    동동이개발바닥
    데부한
  • 전체
    오늘
    어제
    • 분류 전체보기 (307)
      • 방통대 컴퓨터과학과 (27)
        • 잡담 (9)
        • 3학년1학기 (17)
      • 프로젝트 및 컨퍼런스 회고 (1)
        • 프로젝트 (4)
        • 한이음 프로젝트 (0)
        • 회고 (3)
      • 공부 (165)
        • Spring (37)
        • JPA (71)
        • 인프런 워밍업 클럽_BE (10)
        • Java (6)
        • React.js (27)
        • 넥사크로 (11)
        • 기타 (3)
      • 알고리즘 (85)
        • 알고리즘 유형 (10)
        • 알고리즘 풀이 (57)
        • SQL 풀이 (18)
      • 에러 해결 (13)
      • 잡담 (7)
        • 국비교육 (2)
        • 구매후기 (5)
        • 진짜 잡담 (0)
  • 블로그 메뉴

    • Github
    • Linkedin
    • 홈
    • 방명록
    • 글쓰기
    • 관리
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    운영체제
    MSA
    방통대
    개발자
    인프런
    스프링부트
    SQL
    RESTful
    넥사크로
    QueryDSL
    백준
    SpringBoot를 이용한 RESTful Web Service 개발
    egov
    springboot
    oracle
    react
    자바스크립트
    토비의스프링부트
    Java
    IT
    코딩테스트
    프로그래머스
    알고리즘
    JPA
    전자정부프레임워크
    Spring
    토이프로젝트
    에러해결
    프론트엔드
    기출문제
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
데부한
전자정부 표준 프레임워크와 넥사크로 연동하기_1
상단으로

티스토리툴바