├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.yml │ ├── feature_request.yml │ └── improvement_plan.yml ├── pull_request_template.md └── workflows │ └── maven.yml ├── .gitignore ├── .pmd ├── .springBeans ├── DATABASE ├── all_sht_data_altibase.sql ├── all_sht_data_cubrid.sql ├── all_sht_data_mysql.sql ├── all_sht_data_oracle.sql ├── all_sht_data_tibero.sql ├── all_sht_ddl_altibase.sql ├── all_sht_ddl_cubrid.sql ├── all_sht_ddl_mysql.sql ├── all_sht_ddl_oracle.sql └── all_sht_ddl_tibero.sql ├── Docs ├── WebApplicationInitializer-convert.md ├── WebApplicationInitializer.md ├── configuration-setting-bean-regist.md ├── context-aspect-convert.md ├── context-aspect.md ├── context-common-convert.md ├── context-datasource-convert.md ├── context-hierarchy.md ├── context-idgen-convert.md ├── context-mapper-convert.md ├── context-properties-convert.md ├── context-transaction-convert.md ├── context-validator-convert.md ├── context-whitelist-convert.md ├── java-config-convert.md └── servlet.md ├── LICENSE ├── README.md ├── pom.xml └── src ├── main ├── java │ └── egovframework │ │ ├── EgovBootApplication.java │ │ ├── com │ │ ├── cmm │ │ │ ├── AltibaseClobStringTypeHandler.java │ │ │ ├── ComDefaultCodeVO.java │ │ │ ├── ComDefaultVO.java │ │ │ ├── EgovComCrossSiteHndlr.java │ │ │ ├── EgovComExcepHndlr.java │ │ │ ├── EgovComOthersExcepHndlr.java │ │ │ ├── EgovComTraceHandler.java │ │ │ ├── EgovComponentChecker.java │ │ │ ├── EgovMessageSource.java │ │ │ ├── EgovWebUtil.java │ │ │ ├── ImagePaginationRenderer.java │ │ │ ├── IncludedCompInfoVO.java │ │ │ ├── LoginVO.java │ │ │ ├── ResponseCode.java │ │ │ ├── SessionVO.java │ │ │ ├── annotation │ │ │ │ └── IncludedInfo.java │ │ │ ├── filter │ │ │ │ ├── HTMLTagFilter.java │ │ │ │ └── HTMLTagFilterRequestWrapper.java │ │ │ ├── interceptor │ │ │ │ ├── AopExceptionTransfer.java │ │ │ │ ├── AuthenticInterceptor.java │ │ │ │ └── CustomAuthenticInterceptor.java │ │ │ ├── service │ │ │ │ ├── CmmnDetailCode.java │ │ │ │ ├── EgovCmmUseService.java │ │ │ │ ├── EgovFileMngService.java │ │ │ │ ├── EgovFileMngUtil.java │ │ │ │ ├── EgovProperties.java │ │ │ │ ├── EgovUserDetailsService.java │ │ │ │ ├── FileVO.java │ │ │ │ ├── Globals.java │ │ │ │ ├── IntermediateResultVO.java │ │ │ │ ├── ResultVO.java │ │ │ │ └── impl │ │ │ │ │ ├── CmmUseDAO.java │ │ │ │ │ ├── EgovCmmUseServiceImpl.java │ │ │ │ │ ├── EgovFileMngServiceImpl.java │ │ │ │ │ ├── EgovTestUserDetailsServiceImpl.java │ │ │ │ │ ├── EgovUserDetailsSessionServiceImpl.java │ │ │ │ │ └── FileManageDAO.java │ │ │ ├── util │ │ │ │ ├── EgovBasicLogger.java │ │ │ │ ├── EgovIdGnrBuilder.java │ │ │ │ ├── EgovResourceCloseHelper.java │ │ │ │ ├── EgovUserDetailsHelper.java │ │ │ │ └── ResultVoHelper.java │ │ │ └── web │ │ │ │ ├── EgovBindingInitializer.java │ │ │ │ ├── EgovFileDownloadController.java │ │ │ │ ├── EgovFileMngApiController.java │ │ │ │ ├── EgovImageProcessController.java │ │ │ │ └── EgovMultipartResolver.java │ │ ├── config │ │ │ ├── EgovConfigApp.java │ │ │ ├── EgovConfigAppAspect.java │ │ │ ├── EgovConfigAppCommon.java │ │ │ ├── EgovConfigAppDatasource.java │ │ │ ├── EgovConfigAppIdGen.java │ │ │ ├── EgovConfigAppMapper.java │ │ │ ├── EgovConfigAppMsg.java │ │ │ ├── EgovConfigAppProperties.java │ │ │ ├── EgovConfigAppTransaction.java │ │ │ ├── EgovConfigAppValidator.java │ │ │ ├── EgovConfigAppWhitelist.java │ │ │ ├── EgovConfigWebDispatcherServlet.java │ │ │ ├── EgovWebServletContextListener.java │ │ │ ├── HtmlCharacterEscapes.java │ │ │ └── OpenApiConfig.java │ │ ├── jwt │ │ │ ├── EgovJwtTokenUtil.java │ │ │ ├── InvalidJwtException.java │ │ │ ├── JwtAuthenticationEntryPoint.java │ │ │ └── JwtAuthenticationFilter.java │ │ ├── security │ │ │ ├── CustomAuthenticationPrincipalResolver.java │ │ │ ├── SecurityConfig.java │ │ │ └── WebMvcConfig.java │ │ └── sns │ │ │ ├── SnsLoginApiController.java │ │ │ ├── SnsUtils.java │ │ │ └── SnsVO.java │ │ └── let │ │ ├── cop │ │ ├── bbs │ │ │ ├── controller │ │ │ │ ├── EgovBBSAttributeManageApiController.java │ │ │ │ └── EgovBBSManageApiController.java │ │ │ ├── domain │ │ │ │ ├── model │ │ │ │ │ ├── Board.java │ │ │ │ │ ├── BoardMaster.java │ │ │ │ │ ├── BoardMasterVO.java │ │ │ │ │ └── BoardVO.java │ │ │ │ └── repository │ │ │ │ │ ├── BBSAddedOptionsDAO.java │ │ │ │ │ ├── BBSAttributeManageDAO.java │ │ │ │ │ ├── BBSLoneMasterDAO.java │ │ │ │ │ └── BBSManageDAO.java │ │ │ ├── dto │ │ │ │ ├── request │ │ │ │ │ ├── BbsInsertRequestDTO.java │ │ │ │ │ ├── BbsSearchRequestDTO.java │ │ │ │ │ └── BbsUpdateRequestDTO.java │ │ │ │ └── response │ │ │ │ │ ├── BbsDetailResponseDTO.java │ │ │ │ │ ├── BbsInsertResponseDTO.java │ │ │ │ │ └── BbsListResponseDTO.java │ │ │ └── service │ │ │ │ ├── EgovBBSAttributeManageService.java │ │ │ │ ├── EgovBBSLoneMasterService.java │ │ │ │ ├── EgovBBSManageService.java │ │ │ │ └── impl │ │ │ │ ├── EgovBBSAttributeManageServiceImpl.java │ │ │ │ ├── EgovBBSLoneMasterServiceImpl.java │ │ │ │ └── EgovBBSManageServiceImpl.java │ │ ├── com │ │ │ ├── service │ │ │ │ ├── BoardUseInf.java │ │ │ │ ├── BoardUseInfVO.java │ │ │ │ ├── EgovBBSUseInfoManageService.java │ │ │ │ ├── EgovUserInfManageService.java │ │ │ │ ├── UserInfVO.java │ │ │ │ └── impl │ │ │ │ │ ├── BBSUseInfoManageDAO.java │ │ │ │ │ ├── EgovBBSUseInfoManageServiceImpl.java │ │ │ │ │ ├── EgovUserInfManageDAO.java │ │ │ │ │ └── EgovUserInfManageServiceImpl.java │ │ │ └── web │ │ │ │ └── EgovBBSUseInfoManageApiController.java │ │ └── smt │ │ │ └── sim │ │ │ ├── service │ │ │ ├── EgovIndvdlSchdulManageService.java │ │ │ ├── IndvdlSchdulManageVO.java │ │ │ ├── ScheduleSearchVO.java │ │ │ └── impl │ │ │ │ ├── EgovIndvdlSchdulManageServiceImpl.java │ │ │ │ └── IndvdlSchdulManageDao.java │ │ │ └── web │ │ │ └── EgovIndvdlSchdulManageApiController.java │ │ ├── main │ │ ├── service │ │ │ └── EgovMainContentsVO.java │ │ └── web │ │ │ └── EgovMainApiController.java │ │ ├── uat │ │ ├── esm │ │ │ ├── service │ │ │ │ ├── EgovSiteManagerService.java │ │ │ │ └── impl │ │ │ │ │ ├── EgovSiteManagerServiceImpl.java │ │ │ │ │ └── SiteManagerDAO.java │ │ │ └── web │ │ │ │ └── EgovSiteManagerApiController.java │ │ └── uia │ │ │ ├── service │ │ │ ├── EgovLoginService.java │ │ │ └── impl │ │ │ │ ├── EgovLoginServiceImpl.java │ │ │ │ └── LoginDAO.java │ │ │ └── web │ │ │ └── EgovLoginApiController.java │ │ ├── uss │ │ └── umt │ │ │ ├── service │ │ │ ├── EgovMberManageService.java │ │ │ ├── MberManageVO.java │ │ │ ├── StplatVO.java │ │ │ ├── UserDefaultVO.java │ │ │ └── impl │ │ │ │ ├── EgovMberManageServiceImpl.java │ │ │ │ └── MberManageDAO.java │ │ │ └── web │ │ │ └── EgovMberManageApiController.java │ │ └── utl │ │ ├── fcc │ │ └── service │ │ │ ├── EgovDateUtil.java │ │ │ ├── EgovFileUploadUtil.java │ │ │ ├── EgovFormBasedFileUtil.java │ │ │ ├── EgovFormBasedFileVo.java │ │ │ ├── EgovFormBasedUUID.java │ │ │ ├── EgovNumberUtil.java │ │ │ └── EgovStringUtil.java │ │ └── sim │ │ └── service │ │ └── EgovFileScrty.java └── resources │ ├── application-dev.properties │ ├── application-prod.properties │ ├── application.properties │ ├── db │ └── shtdb.sql │ ├── egovframework │ ├── mapper │ │ ├── config │ │ │ └── mapper-config.xml │ │ └── let │ │ │ ├── cmm │ │ │ ├── fms │ │ │ │ ├── EgovFile_SQL_altibase.xml │ │ │ │ ├── EgovFile_SQL_cubrid.xml │ │ │ │ ├── EgovFile_SQL_hsql.xml │ │ │ │ ├── EgovFile_SQL_mysql.xml │ │ │ │ ├── EgovFile_SQL_oracle.xml │ │ │ │ └── EgovFile_SQL_tibero.xml │ │ │ └── use │ │ │ │ ├── EgovCmmUse_SQL_altibase.xml │ │ │ │ ├── EgovCmmUse_SQL_cubrid.xml │ │ │ │ ├── EgovCmmUse_SQL_hsql.xml │ │ │ │ ├── EgovCmmUse_SQL_mysql.xml │ │ │ │ ├── EgovCmmUse_SQL_oracle.xml │ │ │ │ └── EgovCmmUse_SQL_tibero.xml │ │ │ ├── cop │ │ │ ├── bbs │ │ │ │ ├── EgovBBSMaster_SQL_altibase.xml │ │ │ │ ├── EgovBBSMaster_SQL_cubrid.xml │ │ │ │ ├── EgovBBSMaster_SQL_hsql.xml │ │ │ │ ├── EgovBBSMaster_SQL_mysql.xml │ │ │ │ ├── EgovBBSMaster_SQL_oracle.xml │ │ │ │ ├── EgovBBSMaster_SQL_tibero.xml │ │ │ │ ├── EgovBoard_SQL_altibase.xml │ │ │ │ ├── EgovBoard_SQL_cubrid.xml │ │ │ │ ├── EgovBoard_SQL_hsql.xml │ │ │ │ ├── EgovBoard_SQL_mysql.xml │ │ │ │ ├── EgovBoard_SQL_oracle.xml │ │ │ │ └── EgovBoard_SQL_tibero.xml │ │ │ ├── com │ │ │ │ ├── EgovBBSUse_SQL_altibase.xml │ │ │ │ ├── EgovBBSUse_SQL_cubrid.xml │ │ │ │ ├── EgovBBSUse_SQL_hsql.xml │ │ │ │ ├── EgovBBSUse_SQL_mysql.xml │ │ │ │ ├── EgovBBSUse_SQL_oracle.xml │ │ │ │ ├── EgovBBSUse_SQL_tibero.xml │ │ │ │ ├── EgovUserInf_SQL_altibase.xml │ │ │ │ ├── EgovUserInf_SQL_cubrid.xml │ │ │ │ ├── EgovUserInf_SQL_hsql.xml │ │ │ │ ├── EgovUserInf_SQL_mysql.xml │ │ │ │ ├── EgovUserInf_SQL_oracle.xml │ │ │ │ └── EgovUserInf_SQL_tibero.xml │ │ │ └── smt │ │ │ │ └── sim │ │ │ │ ├── EgovIndvdlSchdulManage_SQL_altibase.xml │ │ │ │ ├── EgovIndvdlSchdulManage_SQL_cubrid.xml │ │ │ │ ├── EgovIndvdlSchdulManage_SQL_hsql.xml │ │ │ │ ├── EgovIndvdlSchdulManage_SQL_mysql.xml │ │ │ │ ├── EgovIndvdlSchdulManage_SQL_oracle.xml │ │ │ │ └── EgovIndvdlSchdulManage_SQL_tibero.xml │ │ │ ├── uat │ │ │ ├── esm │ │ │ │ ├── EgovSiteMgr_SQL_altibase.xml │ │ │ │ ├── EgovSiteMgr_SQL_cubrid.xml │ │ │ │ ├── EgovSiteMgr_SQL_hsql.xml │ │ │ │ ├── EgovSiteMgr_SQL_mysql.xml │ │ │ │ ├── EgovSiteMgr_SQL_oracle.xml │ │ │ │ └── EgovSiteMgr_SQL_tibero.xml │ │ │ └── uia │ │ │ │ ├── EgovLoginUsr_SQL_altibase.xml │ │ │ │ ├── EgovLoginUsr_SQL_cubrid.xml │ │ │ │ ├── EgovLoginUsr_SQL_hsql.xml │ │ │ │ ├── EgovLoginUsr_SQL_mysql.xml │ │ │ │ ├── EgovLoginUsr_SQL_oracle.xml │ │ │ │ └── EgovLoginUsr_SQL_tibero.xml │ │ │ └── uss │ │ │ └── umt │ │ │ ├── EgovMberManage_SQL_altibase.xml │ │ │ ├── EgovMberManage_SQL_cubrid.xml │ │ │ ├── EgovMberManage_SQL_hsql.xml │ │ │ ├── EgovMberManage_SQL_mysql.xml │ │ │ ├── EgovMberManage_SQL_oracle.xml │ │ │ └── EgovMberManage_SQL_tibero.xml │ ├── message │ │ └── com │ │ │ ├── message-common.properties │ │ │ ├── message-common_en.properties │ │ │ └── message-common_ko.properties │ └── validator │ │ ├── let │ │ └── cop │ │ │ ├── bbs │ │ │ ├── EgovBdMstrRegist.xml │ │ │ └── EgovNoticeRegist.xml │ │ │ ├── com │ │ │ └── EgovCopComManage.xml │ │ │ └── smt │ │ │ └── sim │ │ │ └── EgovIndvdlSchdulManage.xml │ │ └── validator-rules-let.xml │ ├── logback-spring.xml │ └── static │ └── index.html └── test ├── java └── egovframework │ ├── com │ ├── EgovMessageSourceTest.java │ ├── ProfileTestDev.java │ ├── ProfileTestProd.java │ └── jwt │ │ ├── EgovJwtTokenUtilTest.java │ │ └── JwtAuthenticationFilterTest.java │ ├── let │ ├── cop │ │ └── bbs │ │ │ ├── service │ │ │ ├── BoardTest.java │ │ │ ├── BoardVOTest.java │ │ │ └── impl │ │ │ │ ├── BBSAttributeManageDAOTestInsertBBSMasterInfTest.java │ │ │ │ └── EgovBBSUseInfoManageServiceImplTestInsertBBSMastetInfTest.java │ │ │ └── web │ │ │ ├── EgovBBSAttributeManageApiControllerTestInsertBBSMasterInfTest.java │ │ │ └── EgovBBSAttributeManageApiControllerTestInsertBBSMasterInfTest.json │ └── uat │ │ └── uia │ │ └── web │ │ ├── EgovLoginApiControllerTest.java │ │ └── TestEgovLoginApiControllerSelenium.java │ └── study │ └── jpa │ ├── JpaTest.java │ ├── QueryDslTest.java │ └── domain │ ├── Locker.java │ ├── Member.java │ └── Team.java └── resources └── logback-spring.xml /.github/ISSUE_TEMPLATE/bug_report.yml: -------------------------------------------------------------------------------- 1 | name: 버그 리포트 Bug report 2 | description: 오류 내용을 이슈로 등록하는 템플릿입니다. Template to register an error as an issue. 3 | title: "[Bug]: " 4 | labels: ["bug", "triage"] 5 | assignees: 6 | - rukegithub 7 | body: 8 | - type: markdown 9 | attributes: 10 | value: | 11 | 시간을 내어 버그 리포트를 작성해 주셔서 감사합니다. Thank you for taking the time to fill out a bug report. 12 | - type: input 13 | id: contact 14 | attributes: 15 | label: 연락처 Contact 16 | description: 추가 정보 필요 시, 연락할 수 있는 이메일을 적어 주세요. Please include an email where we can reach you if we need more information. (Optional) 17 | placeholder: 예) email@example.com 18 | validations: 19 | required: false 20 | - type: textarea 21 | id: what-happened 22 | attributes: 23 | label: 오류 내용 Error Description 24 | description: 오류 내용을 기입해 주세요. Please provide a description of the error. 25 | placeholder: Tell us what you see! 26 | value: "오류를 발견했어요. I found an error." 27 | validations: 28 | required: true 29 | - type: textarea 30 | id: reproduce 31 | attributes: 32 | label: 오류 재현 방법 How to reproduce the error 33 | description: 오류 발생을 재현하려면, 어떻게 해야하나요? How can we reproduce the error you reported? 34 | placeholder: 오류 재현 방법 How to reproduce the error 35 | value: "(다음은 예시이며, 내용을 덮어 써 주세요. The following is an example, please overwrite the content.)\n\n 36 | 1. 다음 메뉴를 선택한다. Select the following menu '...'\n 37 | 2. 다음 버튼을 클릭한다. Click the Next button. '....'\n 38 | 3. 다음 문구까지 스크롤 다운한다. Scroll down to the following phrase '....'\n 39 | 4. 오류를 확인한다. Check for errors." 40 | validations: 41 | required: false 42 | - type: textarea 43 | id: environment 44 | attributes: 45 | label: 환경정보 Environmental Information 46 | description: 오류가 발생한 환경정보를 작성해 주세요. Please describe the environment in which the error occurred. 47 | placeholder: 오류 환경정보 Error Environment Information 48 | value: " - OS정보 Operating System: \n 49 | - 표준프레임워크 버전 eGovFrame Version: \n 50 | - JDK(JRE) 정보: \n 51 | - WAS 정보: \n 52 | - DB 정보: \n 53 | - 기타 환경 정보 Other environmental information:" 54 | validations: 55 | required: false 56 | - type: dropdown 57 | id: browsers 58 | attributes: 59 | label: 어느 브라우저를 사용했나요? Which browser did you use? 60 | multiple: true 61 | options: 62 | - Chrome 63 | - Firefox 64 | - Microsoft Edge 65 | - Opera 66 | - Safari 67 | - Internet Explorer 68 | - Others 69 | - type: textarea 70 | id: logs 71 | attributes: 72 | label: 에러 로그 Error Logs 73 | description: 관련 에러 로그를 복사하여 붙여넣어 주세요. Please copy and paste the relevant error logs. 74 | render: shell 75 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.yml: -------------------------------------------------------------------------------- 1 | name: 기능 요구 Feature Request 2 | description: 기능 요구를 이슈로 등록하는 템플릿입니다. Suggest a new feature for improving eGovFrame. 3 | title: "[기능요구(Feature)]: " 4 | labels: ["feature"] 5 | assignees: 6 | - rukegithub 7 | body: 8 | - type: markdown 9 | attributes: 10 | value: | 11 | 시간을 내어 의견을 작성해 주셔서 감사합니다. Thank you for taking the time to fill out a request. 12 | - type: input 13 | id: contact 14 | attributes: 15 | label: 연락처 Contact 16 | description: 추가 정보 필요 시, 연락할 수 있는 이메일을 적어 주세요. Please include an email where we can reach you if we need more information. (Optional) 17 | placeholder: 예) email@example.com 18 | validations: 19 | required: false 20 | - type: input 21 | id: feature-title 22 | attributes: 23 | label: 추가 요청 기능명 Feature Name 24 | description: 추가를 원하는 기능명칭을 간략히 적어주세요. Write the title of the feature you'd like to add. 25 | placeholder: 예) 게시판 첨부기능 추가 Example) Adding a bulletin board attachment 26 | validations: 27 | required: true 28 | - type: textarea 29 | id: feature-request-details 30 | attributes: 31 | label: 기능 상세 설명 Feature Description 32 | description: 추가를 원하는 기능에 대해 상세히 기술해 주세요. Please describe in detail the features you would like to see added. 33 | placeholder: 추가를 원하는 기능은 다음과 같습니다. Here are the features I'd like to see added 34 | validations: 35 | required: true 36 | - type: textarea 37 | id: solution 38 | attributes: 39 | label: 솔루션 상세 Solution Details 40 | description: 위 기능을 구현하는데 도움이 되는 기술내용이 있으면 적어 주세요. If you have any technical details to help us implement the above features, please let us know. 41 | placeholder: 위 기능을 구현하는데 도움이 되는 기술내용은 다음과 같습니다. Here are some technical details to help you implement the above features. 42 | validations: 43 | required: false 44 | - type: input 45 | id: solution-url 46 | attributes: 47 | label: 솔루션 관련 URL Solution-related URLs 48 | description: 위 기능을 구현하는데 도움이 되는 웹사이트 주소가 있으면 적어 주세요. If you have a website address that can help us implement the above features, please write it down. 49 | placeholder: Example) egovframe.go.kr 50 | validations: 51 | required: false 52 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/improvement_plan.yml: -------------------------------------------------------------------------------- 1 | name: 발전 방안 제안 Improvement Plan 2 | description: 발전 방안을 이슈로 등록하는 템플릿입니다. Suggest a new plan for improving eGovFrame. 3 | title: "[발전 방안 제안(Improvement Plan)]: " 4 | labels: ["Improvement"] 5 | assignees: 6 | - yongfire38 7 | body: 8 | - type: markdown 9 | attributes: 10 | value: | 11 | 시간을 내어 의견을 작성해 주셔서 감사합니다. Thank you for taking the time to fill out a request. 12 | - type: input 13 | id: idea-name 14 | attributes: 15 | label: 아이디어명 Idea Name 16 | validations: 17 | required: true 18 | - type: textarea 19 | id: idea-summary 20 | attributes: 21 | label: 아이디어 요약 Idea Summary 22 | description: 과제 내용을 300자 이내로 간결하게 요약 및 정의해 주세요 Please summarize and define your content in 300 characters or less 23 | placeholder: 예) 게시판 첨부기능 추가 Example) Adding a bulletin board attachment 24 | validations: 25 | required: true 26 | - type: textarea 27 | id: suggestion-background 28 | attributes: 29 | label: 제안배경 Suggestion Background 30 | description: 아이디어를 제안하게 된 배경 및 필요성을 기술해 주세요. Please describe the background and need for the idea. 31 | placeholder: 아이디어를 제안하게 된 배경은 다음과 같습니다. The background to suggesting the idea is as follows. 32 | validations: 33 | required: true 34 | - type: textarea 35 | id: expectations 36 | attributes: 37 | label: 기대효과 Expectations 38 | description: 아이디어의 실현 가능성과 예상되는 기대효과를 제시하여 주세요. Please describe the expected impact and outcome of the idea. 39 | placeholder: 해당 아이디어의 기대효과는 다음과 같습니다. Here are the expected effects of this idea. 40 | validations: 41 | required: false 42 | - type: textarea 43 | id: free-writing 44 | attributes: 45 | label: 자유기술 Free Writing 46 | description: 추가 기재하고 싶은 항목 및 내용을 자유롭게 기재하여 주세요. Please feel free to add anything else you'd like to include. 47 | validations: 48 | required: false 49 | - type: textarea 50 | id: reference 51 | attributes: 52 | label: 참고문헌 Reference 53 | description: 참고문헌이 있는 경우 작성하여 주세요. If you have references, please include them. 54 | validations: 55 | required: false 56 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## 수정 사유 Reason for modification 2 | 3 | 소스를 수정한 사유가 무엇인지 체크해 주세요. Please check the reason you modified the source. ([X] X는 대문자여야 합니다.) 4 | 5 | - [x] 버그수정 Bug fixes 6 | - [ ] 기능개선 Enhancements 7 | - [ ] 기능추가 Adding features 8 | - [ ] 기타 Others 9 | 10 | ## 수정된 소스 내용 Modified source 11 | 12 | 검토자를 위해 수정된 소스 내용을 설명해 주세요. Please describe the modified source for reviewers. 13 | 14 | ## JUnit 테스트 JUnit tests 15 | 16 | 테스트를 완료하셨으면 다음 항목에 [대문자X]로 표시해 주세요. When you're done testing, check the following items. 17 | 18 | - [x] JUnit 테스트 JUnit tests 19 | - [x] 수동 테스트 Manual testing 20 | 21 | ## 테스트 브라우저 Test Browser 22 | 23 | 테스트를 진행한 브라우저를 선택해 주세요. Please select the browser(s) you ran the test on. (다중 선택 가능 you can select multiple) [X] X는 대문자여야 합니다. 24 | 25 | - [ ] Chrome 26 | - [ ] Firefox 27 | - [ ] Edge 28 | - [ ] Safari 29 | - [ ] Opera 30 | - [ ] Internet Explorer 31 | - [ ] 기타 Others 32 | 33 | ## 테스트 스크린샷 또는 캡처 영상 Test screenshots or captured video 34 | 35 | 테스트 전과 후의 스크린샷 또는 캡처 영상을 이곳에 첨부해 주세요. Please attach screenshots or video captures of your before and after tests here. 36 | -------------------------------------------------------------------------------- /.github/workflows/maven.yml: -------------------------------------------------------------------------------- 1 | name: Java CI with Maven 2 | 3 | on: 4 | push: 5 | branches: [ "main" ] 6 | pull_request: 7 | branches: [ "main" ] 8 | 9 | permissions: 10 | contents: read 11 | security-events: write 12 | 13 | jobs: 14 | build: 15 | 16 | runs-on: ubuntu-latest 17 | 18 | steps: 19 | - uses: actions/checkout@v3 20 | - name: Set up JDK 8 21 | uses: actions/setup-java@v3 22 | with: 23 | java-version: '8' 24 | distribution: 'adopt' 25 | cache: maven 26 | - name: Build with Maven 27 | run: mvn -B package --file pom.xml -Dmaven.test.skip=true 28 | - name: list artifact 29 | run: ls -laR target 30 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # M2_REPO factorypath 2 | .factorypath 3 | 4 | # Compiled class file 5 | *.class 6 | 7 | # files 8 | files/ 9 | # Log file 10 | backend 11 | *.log 12 | 13 | # BlueJ files 14 | *.ctxt 15 | 16 | # Mobile Tools for Java (J2ME) 17 | .mtj.tmp/ 18 | 19 | # Package Files # 20 | *.jar 21 | *.war 22 | *.nar 23 | *.ear 24 | *.zip 25 | *.tar.gz 26 | *.rar 27 | 28 | # Setting Files # 29 | .idea/ 30 | .settings/ 31 | .project 32 | .classpath 33 | 34 | .git/ 35 | .svn/ 36 | 37 | # Build # 38 | target/ 39 | bin/ 40 | 41 | # OS 42 | .DS_Store 43 | 44 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 45 | hs_err_pid* 46 | -------------------------------------------------------------------------------- /.springBeans: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | src/main/resources/egovframework/spring/com/context-validator.xml 13 | src/main/resources/egovframework/spring/com/context-transaction.xml 14 | src/main/resources/egovframework/spring/com/context-aspect.xml 15 | src/main/resources/egovframework/spring/com/context-common.xml 16 | src/main/webapp/WEB-INF/config/egovframework/springmvc/egov-com-servlet.xml 17 | src/main/resources/egovframework/spring/com/context-idgen.xml 18 | src/main/resources/egovframework/spring/com/context-datasource.xml 19 | src/main/resources/egovframework/spring/com/context-sqlMap.xml 20 | src/main/resources/egovframework/spring/com/context-properties.xml 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Docs/context-hierarchy.md: -------------------------------------------------------------------------------- 1 | # [참고] Context Hierarchy(확인 필요) 2 | 3 | >*Context 란* 4 | > 필요한 정보를 포함하고 있는 설정의 집합 정도로 생각하자 5 | 6 | 스프링에서 Context의 계층관계는 부모 자식 관계로 표현 할 수 있다. 7 | 8 | 아래 처럼 Servlet Context 가 Root Context를 참조한다고 생각하면 되겠다. 9 | 10 | ![Context Hierarchy](https://docs.spring.io/spring-framework/reference/_images/mvc-context-hierarchy.png) 11 | 12 | ## Root WebApplicationContext 13 | 14 | Middle-tier service, Datasources 등을 포함하고 있다. 15 | 16 | View 자원 이외의 공통적으로 이용하는 자원등을 구성할때 주로 사용된다. 우리가 흔히 `@Service`, `@Repository` 등으로 작성하는 영역이 되겠다. 17 | 18 | 19 | 20 | ```xml 21 | 22 | contextConfigLocation 23 | 24 | classpath*:egovframework/spring/com/context-*.xml 25 | 26 | 27 | 28 | 29 | org.springframework.web.context.ContextLoaderListener 30 | 31 | ``` 32 | 33 | ContextLoaderListener를 통해 Root WebApplicationContext를 생성하는데, 34 | `context-param` 엘리먼트를 통해 선언했기 때문에 35 | **Application의 전역**에서 사용 가능한 WebApplicationContext가 되는 것이다. 36 | 37 | 38 | 39 | ## Servlet WebbApplicationContext 40 | 41 | Controller, view resolvers등 Web과 관련된 빈들이 모두 여기에 해당한다. 42 | 43 | 주로 Servlet에서 사용하는 View 자원을 구성할때 사용. 우리가 흔히 `@Controller` 로 작성하는 영역이다. 44 | 45 | 46 | 47 | ```xml 48 | 49 | action 50 | org.springframework.web.servlet.DispatcherServlet 51 | 52 | contextConfigLocation 53 | /WEB-INF/config/egovframework/springmvc/*.xml 54 | 55 | 1 56 | 57 | ``` 58 | 59 | DispatcherServlet을 통해 Servlet WebApplicationContext를 생성하는데, 60 | `servlet` 엘리먼트를 통해 선언했기 때문에 61 | **해당 Servlet**에서만 사용 가능한 WebApplicationContext가 되는 것이다. 62 | 63 | 64 | 65 | ## 계층 관계 컨텍스트 66 | 67 | 위의 두 context 모두 `param-name`이 `contextConfigLocation` 이라는 것을 볼 수 있다. 68 | 69 | 70 | 71 | 참조 72 | 73 | ----- 74 | 75 | https://jayviii.tistory.com/9 76 | 77 | https://docs.spring.io/spring/docs/current/spring-framework-reference/web.html#spring-web 78 | 79 | -------------------------------------------------------------------------------- /Docs/context-idgen-convert.md: -------------------------------------------------------------------------------- 1 | # context-idgen.xml 설정 변환 2 | 3 | > Id Generation을 위한 설정이다. 4 | 5 | 6 | 7 | Table별 채번을 위한 Id Generation을 위한 설정으로 한번에 생성될 ID의 blockSize , ID 관리 테이블, ID 사용 테이블, ID의 머릿글자, ID의 자리수, 자리 채움 문자를 설정 할 수 있다. 8 | 9 | 10 | 11 | ```xml 12 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 24 | 25 | 26 | 27 | 28 | ``` 29 | 30 | 31 | 32 | 33 | ```java 34 | @Bean(destroyMethod = "destroy") 35 | public EgovTableIdGnrServiceImpl egovFileIdGnrService() { 36 | EgovTableIdGnrServiceImpl egovTableIdGnrServiceImpl = new EgovTableIdGnrServiceImpl(); 37 | egovTableIdGnrServiceImpl.setDataSource(dataSource); 38 | egovTableIdGnrServiceImpl.setStrategy(fileStrategy()); 39 | egovTableIdGnrServiceImpl.setBlockSize(10); 40 | egovTableIdGnrServiceImpl.setTable("IDS"); 41 | egovTableIdGnrServiceImpl.setTableName("FILE_ID"); 42 | return egovTableIdGnrServiceImpl; 43 | } 44 | 45 | private EgovIdGnrStrategyImpl fileStrategy() { 46 | EgovIdGnrStrategyImpl egovIdGnrStrategyImpl = new EgovIdGnrStrategyImpl(); 47 | egovIdGnrStrategyImpl.setPrefix("FILE_"); 48 | egovIdGnrStrategyImpl.setCipers(15); 49 | egovIdGnrStrategyImpl.setFillChar('0'); 50 | return egovIdGnrStrategyImpl; 51 | } 52 | 53 | ``` 54 | 55 | 56 | 57 | 위의 형식이 반복되므로 이를 간단하게 builder 형태로 설정 할 수 있다. 58 | 59 | 60 | 61 | ```java 62 | @Bean(destroyMethod = "destroy") 63 | public EgovTableIdGnrServiceImpl egovBBSMstrIdGnrService() { 64 | return new EgovIdGnrBuilder().setDataSource(dataSource).setEgovIdGnrStrategyImpl(new EgovIdGnrStrategyImpl()) 65 | .setBlockSize(10) 66 | .setTable("IDS") 67 | .setTableName("BBS_ID") 68 | .setPreFix("BBSMSTR_") 69 | .setCipers(12) 70 | .setFillChar('0') 71 | .build(); 72 | } 73 | 74 | ``` 75 | 76 | -------------------------------------------------------------------------------- /Docs/context-mapper-convert.md: -------------------------------------------------------------------------------- 1 | # context-mapper.xml 설정 변환 2 | 3 | > mapper 설정 파일을 지정해주는 설정파일 4 | 5 | 6 | 7 | mapper 설정 파일을 등록해 준다. 8 | 9 | 10 | 11 | ```xml 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | classpath:/egovframework/mapper/let/**/*_${Globals.DbType}.xml 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | ``` 33 | 34 | 35 | 36 | ```java 37 | @Bean 38 | @Lazy 39 | public DefaultLobHandler lobHandler() { 40 | return new DefaultLobHandler(); 41 | } 42 | 43 | @Bean(name = {"sqlSession", "egov.sqlSession"}) 44 | public SqlSessionFactoryBean sqlSession() { 45 | SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean(); 46 | sqlSessionFactoryBean.setDataSource(dataSource); 47 | 48 | PathMatchingResourcePatternResolver pathMatchingResourcePatternResolver = new PathMatchingResourcePatternResolver(); 49 | 50 | sqlSessionFactoryBean.setConfigLocation( 51 | pathMatchingResourcePatternResolver 52 | .getResource("classpath:/egovframework/mapper/config/mapper-config.xml")); 53 | 54 | try { 55 | sqlSessionFactoryBean.setMapperLocations( 56 | pathMatchingResourcePatternResolver 57 | .getResources("classpath:/egovframework/mapper/let/**/*_" + dbType + ".xml")); 58 | } catch (IOException e) { 59 | // TODO Exception 처리 필요 60 | } 61 | 62 | return sqlSessionFactoryBean; 63 | } 64 | 65 | @Bean 66 | public SqlSessionTemplate egovSqlSessionTemplate(@Qualifier("sqlSession") SqlSessionFactory sqlSession) { 67 | SqlSessionTemplate sqlSessionTemplate = new SqlSessionTemplate(sqlSession); 68 | return sqlSessionTemplate; 69 | } 70 | ``` -------------------------------------------------------------------------------- /Docs/context-properties-convert.md: -------------------------------------------------------------------------------- 1 | # context-properties.xml 설정 변환 2 | 3 | > 프로퍼티 정보 설정 4 | 5 | 6 | 7 | 프로젝트 내에서 사용할 EgovPropertyService에 값을 등록 하는 예제이다. 8 | 9 | 10 | 11 | ```xml 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | ``` 24 | 25 | 26 | 27 | ```java 28 | @Bean(destroyMethod = "destroy") 29 | public EgovPropertyServiceImpl propertiesService() { 30 | EgovPropertyServiceImpl egovPropertyServiceImpl = new EgovPropertyServiceImpl(); 31 | 32 | Map properties = new HashMap(); 33 | properties.put("pageUnit", "10"); 34 | properties.put("pageSize", "10"); 35 | properties.put("posblAtchFileSize", "5242880"); 36 | properties.put("Globals.fileStorePath", "/user/file/sht/"); 37 | properties.put("Globals.addedOptions", "false"); 38 | 39 | egovPropertyServiceImpl.setProperties(properties); 40 | return egovPropertyServiceImpl; 41 | } 42 | ``` -------------------------------------------------------------------------------- /Docs/context-validator-convert.md: -------------------------------------------------------------------------------- 1 | # context-validator.xml 설정 변환 2 | 3 | > validator 설정 파일을 등록하는 역할을 한다. 4 | 5 | 6 | 7 | validator 설정 파일들의 위치를 지정해 준다. 8 | 9 | 10 | 11 | ```xml 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | classpath:/egovframework/validator/validator-rules-let.xml 21 | classpath:/egovframework/validator/let/**/*.xml 22 | 23 | 24 | 25 | ``` 26 | 27 | 28 | 29 | ```java 30 | @Bean 31 | public DefaultBeanValidator beanValidator() { 32 | DefaultBeanValidator defaultBeanValidator = new DefaultBeanValidator(); 33 | defaultBeanValidator.setValidatorFactory(validatorFactory()); 34 | return defaultBeanValidator; 35 | } 36 | 37 | @Bean 38 | public DefaultValidatorFactory validatorFactory() { 39 | DefaultValidatorFactory defaultValidatorFactory = new DefaultValidatorFactory(); 40 | defaultValidatorFactory.setValidationConfigLocations(getValidationConfigLocations()); 41 | return defaultValidatorFactory; 42 | } 43 | 44 | private Resource[] getValidationConfigLocations() { 45 | PathMatchingResourcePatternResolver pathMatchingResourcePatternResolver = new PathMatchingResourcePatternResolver(); 46 | List validationConfigLocations = new ArrayList(); 47 | Resource[] validationRulesConfigLocations = new Resource[] { 48 | pathMatchingResourcePatternResolver 49 | .getResource("classpath:/egovframework/validator/validator-rules-let.xml") 50 | }; 51 | 52 | Resource[] validationFormSetLocations = new Resource[] {}; 53 | try { 54 | validationFormSetLocations = pathMatchingResourcePatternResolver 55 | .getResources("classpath:/egovframework/validator/let/**/*.xml"); 56 | } catch (IOException e) { 57 | } 58 | 59 | validationConfigLocations.addAll(Arrays.asList(validationRulesConfigLocations)); 60 | validationConfigLocations.addAll(Arrays.asList(validationFormSetLocations)); 61 | 62 | return validationConfigLocations.toArray(new Resource[validationConfigLocations.size()]); 63 | } 64 | ``` -------------------------------------------------------------------------------- /Docs/context-whitelist-convert.md: -------------------------------------------------------------------------------- 1 | # context-whitelist.xml 설정 변환 2 | 3 | > white list를 관리하는 설정이다. 4 | 5 | 6 | 7 | white list를 등록하는 설정이다. 8 | 9 | 10 | 11 | ```xml 12 | 13 | main/inc/EgovIncHeader 14 | main/inc/EgovIncTopnav 15 | main/inc/EgovIncLeftmenu 16 | main/inc/EgovIncFooter 17 | main/sample_menu/Intro 18 | main/sample_menu/EgovDownloadDetail 19 | main/sample_menu/EgovDownloadModify 20 | main/sample_menu/EgovQADetail 21 | main/sample_menu/EgovServiceInfo 22 | main/sample_menu/EgovAboutSite 23 | main/sample_menu/EgovHistory 24 | main/sample_menu/EgovOrganization 25 | main/sample_menu/EgovLocation 26 | main/sample_menu/EgovProductInfo 27 | main/sample_menu/EgovProductInfo 28 | main/sample_menu/EgovServiceInfo 29 | main/sample_menu/EgovDownload 30 | main/sample_menu/EgovQA 31 | main/sample_menu/EgovService 32 | 33 | ``` 34 | 35 | 36 | 37 | ```java 38 | @Bean 39 | public List egovPageLinkWhitelist() { 40 | List whiteList = new ArrayList(); 41 | whiteList.add("main/inc/EgovIncHeader"); 42 | whiteList.add("main/inc/EgovIncTopnav"); 43 | whiteList.add("main/inc/EgovIncLeftmenu"); 44 | whiteList.add("main/inc/EgovIncFooter"); 45 | whiteList.add("main/sample_menu/Intro"); 46 | whiteList.add("main/sample_menu/EgovDownloadDetail"); 47 | whiteList.add("main/sample_menu/EgovDownloadModify"); 48 | whiteList.add("main/sample_menu/EgovQADetail"); 49 | whiteList.add("main/sample_menu/EgovAboutSite"); 50 | whiteList.add("main/sample_menu/EgovHistory"); 51 | whiteList.add("main/sample_menu/EgovOrganization"); 52 | whiteList.add("main/sample_menu/EgovLocation"); 53 | whiteList.add("main/sample_menu/EgovProductInfo"); 54 | whiteList.add("main/sample_menu/EgovServiceInfo"); 55 | whiteList.add("main/sample_menu/EgovDownload"); 56 | whiteList.add("main/sample_menu/EgovQA"); 57 | whiteList.add("main/sample_menu/EgovService"); 58 | return whiteList; 59 | } 60 | ``` -------------------------------------------------------------------------------- /Docs/java-config-convert.md: -------------------------------------------------------------------------------- 1 | # JavaConfig 변환 2 | 3 | ## 1. web.xml 변환 4 | 기존의 web.xml에서 설정을 변환하여 EgovWebApplicationInitializer 에서 설정 5 | 6 | ``` 7 | src/main/java/egovframework/com/config/EgovWebApplicationInitializer.java 8 | ``` 9 | 10 | - [WebApplicationInitial 변환 방법](./WebApplicationInitializer-convert.md) 11 | 12 | 13 | 14 | ## 2. context-*.xml 변환 15 | 16 | `src/main/java/egovframework/com/config/` 아래에 설정 파일 위치 17 | 18 | 기존 ApplicationContext 레벨의 설정들은 `EgovConfigApp*.java` 로 구성. 19 | 기존 WebApplicationContext 레벨의 설정들은 `EgovConfigWeb*.java` 로 구성 20 | 21 | 22 | - [설정파일 변환 방법](./configuration-setting-bean-regist.md) 23 | - [context-aspect 변환](./context-aspect-convert.md) 24 | - [context-common 변환](./context-common-convert.md) 25 | - [context-datasource 변환](./context-datasource-convert.md) 26 | - [context-idgen 변환](./context-idgen-convert.md) 27 | - [context-mapper 변환](./context-mapper-convert.md) 28 | - [context-properties 변환](./context-properties-convert.md) 29 | - [context-transaction 변환](./context-transaction-convert.md) 30 | - [context-validator 변환](./context-validator-convert.md) 31 | - [context-whitelist 변환](./context-whitelist-convert.md) 32 | 33 | 34 | --- 35 | 36 | 참고 사항 37 | 38 | [Context의 계층 관계](./context-hierarchy.md) 39 | 40 | [WebApplicationInitial이란](./WebApplicationInitializer.md) 41 | -------------------------------------------------------------------------------- /Docs/servlet.md: -------------------------------------------------------------------------------- 1 | # Servlet 2 | 3 | > **Servlet 이란** 4 | > 5 | > 클라이언트의 요청을 처리하고, 그 결과를 반환하는 6 | > Servlet 클래스의 구현 규칙을 지킨 자바 웹 프로그래밍 기술 7 | 8 | 자바를 사용하여 웹을 만들기 위해 필요한 기술. 클라이언트가 어떠한 요청을 하면 그에 대한 결과를 다시 전송하기 위한 프로그램. 자바로 구현된 CGI . 9 | 10 | > **CGI(Common Gateway Interface)란?** 11 | > 12 | > 웹 서버와 프로그램간의 교환방식. (특별한 라이브러리나 도구를 의미하는 것 X) 13 | > 어떠한 프로그래밍언어로도 구현이가능. 14 | > 클라이언트의 HTTP요청에 대해 특정 기능을 수행하고, HTML 문서등 프로그램의 표준 출력 결과를 클라이언트에게 전송하는 것입니다. 15 | > 즉, 자바 어플리케이션 코딩을 하듯 웹 브라우저용 출력 화면을 만드는 방법입니다. 16 | 17 | ## Servlet Container 역할 18 | 19 | > **Servlet Container** 20 | > 21 | > Servlet을 관리해주는 Container. 22 | > 23 | > 서버에 Servlet을 만들었다고 해서 스스로 작동하는 것이 아님. Servlet의 동작을 관리해주는 역할을 하는 것이 바로 Servlet Container. Servlet Container는 클라이언트의 요청(Request)을 받아주고 응답(Response)할 수 있게, 웹서버와 소켓으로 통신. 24 | > 25 | > ex) 톰캣(Tomcat) 26 | > 27 | > 톰캣은 실제로 웹 서버와 통신하여 JSP와 Servlet이 작동하는 환경을 제공해줍니다. 28 | 29 | ### 웹 서버와의 통신 지원 30 | 31 | 일반적인 통신은 소켓을 만들고, 특정 port를 Listening 하고, 연결 요청이 들어오면 스트림을 생성해서 요청을 받는다. Servlet Container는 이런 통신 과정을 API 로 제공하고 있기 때문에 우리가 쉽게 사용할 수 있다. 32 | 33 | ### 생명주기(Life Cycle) 관리 34 | Servlet Container가 기동 시 Servlet Class를 로딩해서 인스턴스화하고, 초기화 메서드를 호출. 35 | 요청이 들어오면 적절한 Servlet 메소드를 찾아서 호출한다. 36 | 만약 서블릿의 생명이 다하는 순간 가비지 컬렉션을 진행한다. 37 | 38 | ### 멀티스레드 지원 및 관리 39 | Servlet Container는 해당 Servlet의 요청이 들어오면 스레드를 생성해서 작업을 수행한다. 즉 동시의 여러 요청이 들어온다면 멀티스레딩 환경으로 동시다발적인 작업을 관리한다. 40 | 41 | ### 선언적 보안관리 42 | Servlet Container는 보안 관련된 기능을 지원한다. 따라서 서블릿 코드 안에 보안 관련된 메소드를 구현하지 않아도 된다. 43 | 44 | 45 | 46 | ## Servlet 동작 방식 47 | 48 | 1. client가 URL을 입력하면 HTTP Request가 Servlet Container로 전송합니다.![img](https://miro.medium.com/max/711/1*p3bdLuk7wjHFS0n8YJXQ_A.png) 49 | 50 | 51 | 52 | 2. 요청을 전송받은 Servlet Container는 HttpServletRequest, HttpServletResponse 객체를 생성합니다. 53 | ![img](https://miro.medium.com/max/821/1*Q4tv8s-_NYuHuE3tYbWcfg.png) 54 | 55 | 3. web.xml을 기반으로 사용자가 요청한 URL이 어느 Servlet에 대한 요청인지 찾습니다. 56 | 57 | 4. 해당 Servlet에서 service메소드를 호출한 후 클리아언트의 HTTP 프로토콜에 따라 해당 메소를 호출합니다. 58 | ![img](https://miro.medium.com/max/761/1*RoDdyWhZxiZ5ODWoK9XnGw.png) 59 | 60 | 5. 해당 메소드는 동적 페이지를 생성한 후 HttpServletResponse객체에 응답을 보냅니다. 61 | 62 | 6. 응답이 끝나면 HttpServletRequest, HttpServletResponse 두 객체를 소멸시킵니다. 63 | 64 | 65 | 66 | 기존 67 | 68 | 1. 기존 방식 69 | 1) Servlet Container가 먼저 뜨고 70 | 2) ServletContainer 안에 등록되는 Servlet Application에다가 Spring을 연동하는 방식이다. 71 | ContextLoaderListener 등록 OR DispatcherServlet 등록 72 | 2. boot 방식 73 | 1) Spring Boot Application 이 Java Application으로 먼저 뜨고, 74 | 2) 그 안에 tomcat이 내장 서버로 뜬다. 75 | 3) Servlet(ex, DispatcherServlet)을 내장 톰켓 안에다가 코드로 등록한다. 76 | 77 | 78 | 79 | 출처 80 | 81 | ------ 82 | 83 | https://mangkyu.tistory.com/14 [MangKyu's Diary] 84 | 85 | https://jsonsang2.tistory.com/52 [리루] 86 | 87 | https://codeburst.io/understanding-java-servlet-architecture-b74f5ea64bf4 88 | 89 | https://jusungpark.tistory.com/15 [정리정리정리] -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 표준프레임워크 심플홈페이지 BackEnd 2 | 3 | ![java](https://img.shields.io/badge/java-007396?style=for-the-badge&logo=JAVA&logoColor=white) 4 | ![Spring_boot](https://img.shields.io/badge/Spring_Boot-F2F4F9?style=for-the-badge&logo=spring-boot) 5 | ![maven](https://img.shields.io/badge/Maven-C71A36?style=for-the-badge&logo=apache-maven&logoColor=white) 6 | ![swagger](https://img.shields.io/badge/swagger-85EA2D?style=for-the-badge&logo=swagger&logoColor=black) 7 | ![workflow](https://github.com/eGovFramework/egovframe-template-simple-backend/actions/workflows/maven.yml/badge.svg) 8 | 9 | ※ 본 프로젝트는 기존 JSP 뷰 방식에서 벗어나 BackEnd와 FrontEnd를 분리하기 위한 예시 파일로 참고만 하시길 바랍니다. 10 | 11 | ## 환경 설정 12 | 13 | 프로젝트에서 사용된 환경 프로그램 정보는 다음과 같다. 14 | | 프로그램 명 | 버전 명 | 15 | | :--------- | :------ | 16 | | java | 1.8 이상 | 17 | | maven | 3.8.4 | 18 | 19 | ## BackEnd 구동 20 | 21 | ### CLI 구동 방법 22 | 23 | ```bash 24 | mvn spring-boot:run 25 | ``` 26 | 27 | ### IDE에서 BackEnd 구동 방법 28 | 29 | 개발환경에서 프로젝트 우클릭 > Run As > Spring Boot App을 통해 구동한다. 30 | 31 | ### BackEnd 구동 후 확인 32 | 33 | 구동 후, 브라우저에서 `http://localhost:포트번호/` 로 확인이 가능하다. 34 | 초기 포트번호는 8080이며 `/src/main/resources/application.properties` 파일의 `server.port` 항목에서 변경 가능하다. 35 | 또한, 스웨거(Swagger)에서 테스트할 때는 아래처럼 사용한다. 36 | - 스웨거3.x에서는 `http://localhost:포트번호/swagger-ui/index.html` 로 애플리케이션의 엔드포인트를 확인 가능하다. 37 | - 참고로, 예전 스웨거2.x에서는 `http://localhost:포트번호/swagger-ui.html` 로 애플리케이션의 엔드포인트 확인이 가능했다. 38 | - 스웨거에서 GET방식으로 테스트할 때는 jwt(토큰) 인증 없이 사용 가능하다. 39 | 단, POST,PUT,DELETE 엔드포인트를 사용 하기위해서는 jwt(토큰)을 사용해 인가된 사용자로 사용해야 한다. 40 | 인가 받지 않고 사용하면, 401(403) "인가된 사용자가 아닙니다." 와 같은 에러 메세지를 확인하게 된다. 41 | - [POST] 엔드포인트 사용 예), 스웨거에서 /auth/login-jwt 엔드포인트 [Try it out]에서 아이디/암호(admin/1)을 입력 및 [Execute]실행 후 42 | [Response body] 항목의 "jToken": "토큰 값" 에서 토큰 값을 복사하여 43 | [Authorize] 팝업창에서 "토큰 값"을 Value 란에 입력 후 [Authorize] 버튼을 클릭하면, 인증이 되고 44 | 이후 [POST]와 같은 보안 인가(인증)이 필요한 엔드포인트 사용이 가능해 진다. 45 | 46 | ## FrontEnd 구동 (React) 47 | 48 | 현재 FrontEnd는 React 관련 예제로 구성되어 있다. 49 | [심플홈페이지FrontEnd](https://github.com/eGovFramework/egovframe-template-simple-react.git) 소스를 받아 구동한다. 50 | 51 | ## 변경 사항 52 | 53 | ### 1. [Java Config 변환](./Docs/java-config-convert.md) 54 | 55 | #### 1) Web.xml -> WebApplicationInitializer 구현체로 변환 56 | 57 | #### 2) context-\*.xml -> @Configuration 변환 58 | 59 | #### 3) properties 변환(예정) boot 지원 60 | 61 | ### 2. API 변환 62 | 63 | 직접 View와 연결하던 방법에서 API 형식으로 변환 -> 다양한 프론트에서 적용 가능 하도록 예제 제공\ 64 | ※ API를 사용한 Controller들은 ~ApiController.java에서 확인 가능합니다. 65 | 66 | ## Jar 실행시 67 | ```bash 68 | java -jar --spring.profiles.active= 69 | ``` -------------------------------------------------------------------------------- /src/main/java/egovframework/EgovBootApplication.java: -------------------------------------------------------------------------------- 1 | package egovframework; 2 | 3 | import org.springframework.boot.Banner; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | import org.springframework.boot.web.servlet.ServletComponentScan; 7 | 8 | import lombok.extern.slf4j.Slf4j; 9 | 10 | @Slf4j 11 | @ServletComponentScan 12 | @SpringBootApplication 13 | public class EgovBootApplication { 14 | public static void main(String[] args) { 15 | log.debug("##### EgovBootApplication Start #####"); 16 | 17 | SpringApplication springApplication = new SpringApplication(EgovBootApplication.class); 18 | springApplication.setBannerMode(Banner.Mode.OFF); 19 | //springApplication.setLogStartupInfo(false); 20 | springApplication.run(args); 21 | 22 | log.debug("##### EgovBootApplication End #####"); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/ComDefaultCodeVO.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.cmm; 2 | 3 | import java.io.Serializable; 4 | 5 | import lombok.Getter; 6 | import lombok.Setter; 7 | import org.apache.commons.lang3.builder.ToStringBuilder; 8 | 9 | /** 10 | * 클래스 11 | * @author 공통서비스개발팀 이삼섭 12 | * @since 2009.06.01 13 | * @version 1.0 14 | * @see 15 | * 16 | *
17 |  * << 개정이력(Modification Information) >>
18 |  *
19 |  *   수정일      수정자           수정내용
20 |  *  -------       --------    ---------------------------
21 |  *   2009.3.11   이삼섭          최초 생성
22 |  *
23 |  * 
24 | */ 25 | @Getter 26 | @Setter 27 | public class ComDefaultCodeVO implements Serializable { 28 | /** 29 | * serialVersion UID 30 | */ 31 | private static final long serialVersionUID = -2020648489890016404L; 32 | 33 | /** 코드 ID */ 34 | private String codeId = ""; 35 | 36 | /** 상세코드 */ 37 | private String code = ""; 38 | 39 | /** 코드명 */ 40 | private String codeNm = ""; 41 | 42 | /** 코드설명 */ 43 | private String codeDc = ""; 44 | 45 | /** 특정테이블명 */ 46 | private String tableNm = ""; //특정테이블에서 코드정보를추출시 사용 47 | 48 | /** 상세 조건 여부 */ 49 | private String haveDetailCondition = "N"; 50 | 51 | /** 상세 조건 */ 52 | private String detailCondition = ""; 53 | 54 | /** 55 | * toString 메소드를 대치한다. 56 | */ 57 | public String toString() { 58 | return ToStringBuilder.reflectionToString(this); 59 | } 60 | } -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/ComDefaultVO.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.cmm; 2 | 3 | import java.io.Serializable; 4 | 5 | import lombok.Getter; 6 | import lombok.Setter; 7 | import org.apache.commons.lang3.builder.ToStringBuilder; 8 | 9 | /** 10 | * @Class Name : ComDefaultVO.java 11 | * @Description : ComDefaultVO class 12 | * @Modification Information 13 | * @ 14 | * @ 수정일 수정자 수정내용 15 | * @ ------- -------- --------------------------- 16 | * @ 2009.02.01 조재영 최초 생성 17 | * 18 | * @author 공통서비스 개발팀 조재영 19 | * @since 2009.02.01 20 | * @version 1.0 21 | * @see 22 | * 23 | */ 24 | @Getter 25 | @Setter 26 | public class ComDefaultVO implements Serializable { 27 | 28 | private static final long serialVersionUID = 1L; 29 | 30 | /** 검색조건 */ 31 | private String searchCondition = ""; 32 | 33 | /** 검색Keyword */ 34 | private String searchKeyword = ""; 35 | 36 | /** 검색사용여부 */ 37 | private String searchUseYn = ""; 38 | 39 | /** 현재페이지 */ 40 | private int pageIndex = 1; 41 | 42 | /** 페이지갯수 */ 43 | private int pageUnit = 10; 44 | 45 | /** 페이지사이즈 */ 46 | private int pageSize = 10; 47 | 48 | /** firstIndex */ 49 | private int firstIndex = 1; 50 | 51 | /** lastIndex */ 52 | private int lastIndex = 1; 53 | 54 | /** recordCountPerPage */ 55 | private int recordCountPerPage = 10; 56 | 57 | /** 검색KeywordFrom */ 58 | private String searchKeywordFrom = ""; 59 | 60 | /** 검색KeywordTo */ 61 | private String searchKeywordTo = ""; 62 | 63 | public String toString() { 64 | return ToStringBuilder.reflectionToString(this); 65 | } 66 | 67 | 68 | } -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/EgovComExcepHndlr.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.cmm; 2 | 3 | import org.egovframe.rte.fdl.cmmn.exception.handler.ExceptionHandler; 4 | 5 | import lombok.extern.slf4j.Slf4j; 6 | 7 | /** 8 | * @Class Name : EgovComExcepHndlr.java 9 | * @Description : 공통서비스의 exception 처리 클래스 10 | * @Modification Information 11 | * 12 | * 수정일 수정자 수정내용 13 | * ------- ------- ------------------- 14 | * 2009. 3. 13. 이삼섭 15 | * 16 | * @author 공통 서비스 개발팀 이삼섭 17 | * @since 2009. 3. 13. 18 | * @version 19 | * @see 20 | * 21 | */ 22 | @Slf4j 23 | public class EgovComExcepHndlr implements ExceptionHandler { 24 | 25 | 26 | /** 27 | * 발생된 Exception을 처리한다. 28 | */ 29 | public void occur(Exception ex, String packageName) { 30 | log.debug("[HANDLER][PACKAGE]::: {}", packageName); 31 | log.debug("[HANDLER][Exception]:::", ex); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/EgovComOthersExcepHndlr.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.cmm; 2 | 3 | import org.egovframe.rte.fdl.cmmn.exception.handler.ExceptionHandler; 4 | 5 | import lombok.extern.slf4j.Slf4j; 6 | 7 | @Slf4j 8 | public class EgovComOthersExcepHndlr implements ExceptionHandler { 9 | 10 | public void occur(Exception exception, String packageName) { 11 | //log.debug(" EgovServiceExceptionHandler run..............."); 12 | log.error(packageName, exception); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/EgovComTraceHandler.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.cmm; 2 | 3 | import org.egovframe.rte.fdl.cmmn.trace.handler.TraceHandler; 4 | 5 | import lombok.extern.slf4j.Slf4j; 6 | 7 | /** 8 | * @Class Name : EgovComTraceHandler.java 9 | * @Description : 공통서비스의 trace 처리 클래스 10 | * @Modification Information 11 | * 12 | * 수정일 수정자 수정내용 13 | * ------- ------- ------------------- 14 | * 2011. 09. 30. JJY 15 | * 16 | * @author JJY 17 | * @since 2011. 9. 30. 18 | * 19 | */ 20 | @Slf4j 21 | public class EgovComTraceHandler implements TraceHandler { 22 | 23 | /** 24 | * 발생된 메시지를 출력한다. 25 | */ 26 | public void todo(Class clazz, String message) { 27 | //log.debug("log ==> DefaultTraceHandler run..............."); 28 | log.debug("[TRACE]CLASS::: {}", clazz.getName()); 29 | log.debug("[TRACE]MESSAGE::: {}", message); 30 | //이곳에서 후속처리로 필요한 액션을 취할 수 있다. 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/EgovComponentChecker.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.cmm; 2 | 3 | import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl; 4 | 5 | import org.springframework.beans.BeansException; 6 | import org.springframework.beans.factory.NoSuchBeanDefinitionException; 7 | import org.springframework.context.ApplicationContext; 8 | import org.springframework.context.ApplicationContextAware; 9 | import org.springframework.stereotype.Service; 10 | import org.springframework.util.ObjectUtils; 11 | 12 | 13 | /** 14 | * EgovComUtil 클래스 15 | * 16 | * @author 서준식 17 | * @since 2011.09.15 18 | * @version 1.0 19 | * @see 20 | * 21 | *
22 |  * << 개정이력(Modification Information) >>
23 |  *
24 |  *   수정일      수정자           수정내용
25 |  *  -------    -------------    ----------------------
26 |  *   2011.09.15  서준식        최초 생성
27 |  * 
28 | */ 29 | 30 | @Service("egovUtil") 31 | public class EgovComponentChecker extends EgovAbstractServiceImpl implements ApplicationContextAware{ 32 | 33 | 34 | public static ApplicationContext context; 35 | 36 | @Override 37 | @SuppressWarnings("static-access") 38 | public void setApplicationContext(ApplicationContext context) 39 | throws BeansException { 40 | 41 | this.context = context; 42 | } 43 | 44 | /** 45 | * Spring MVC에서 설정한 빈이 아닌 서비스 빈(컴포넌트)만을 검색할 수 있음 46 | * 47 | */ 48 | public static boolean hasComponent(String componentName){ 49 | 50 | try{ 51 | Object component = context.getBean(componentName); 52 | 53 | // Fix: Null pointers should not be dereferenced 이슈 수정 54 | if(ObjectUtils.isEmpty(component)){ 55 | return false; 56 | }else{ 57 | return true; 58 | } 59 | 60 | }catch(NoSuchBeanDefinitionException ex){// 해당 컴포넌트를 찾을 수없을 경우 false반환 61 | return false; 62 | } 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/EgovMessageSource.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.cmm; 2 | 3 | import java.util.Locale; 4 | 5 | import org.springframework.context.MessageSource; 6 | import org.springframework.context.support.ReloadableResourceBundleMessageSource; 7 | 8 | /** 9 | * 메시지 리소스 사용을 위한 MessageSource 인터페이스 및 ReloadableResourceBundleMessageSource 클래스의 구현체 10 | * @author 공통서비스 개발팀 이문준 11 | * @since 2009.06.01 12 | * @version 1.0 13 | * @see 14 | * 15 | *
16 |  * << 개정이력(Modification Information) >>
17 |  *   
18 |  *   수정일      수정자           수정내용
19 |  *  -------    --------    ---------------------------
20 |  *   2009.03.11  이문준          최초 생성
21 |  *
22 |  * 
23 | */ 24 | 25 | public class EgovMessageSource extends ReloadableResourceBundleMessageSource implements MessageSource { 26 | 27 | private ReloadableResourceBundleMessageSource reloadableResourceBundleMessageSource; 28 | 29 | /** 30 | * getReloadableResourceBundleMessageSource() 31 | * @param reloadableResourceBundleMessageSource - resource MessageSource 32 | * @return ReloadableResourceBundleMessageSource 33 | */ 34 | public void setReloadableResourceBundleMessageSource(ReloadableResourceBundleMessageSource reloadableResourceBundleMessageSource) { 35 | this.reloadableResourceBundleMessageSource = reloadableResourceBundleMessageSource; 36 | } 37 | 38 | /** 39 | * getReloadableResourceBundleMessageSource() 40 | * @return ReloadableResourceBundleMessageSource 41 | */ 42 | public ReloadableResourceBundleMessageSource getReloadableResourceBundleMessageSource() { 43 | return reloadableResourceBundleMessageSource; 44 | } 45 | 46 | /** 47 | * Default Locale 정의된 메세지 조회 48 | * @param code - 메세지 코드 49 | * @return String 50 | */ 51 | public String getMessage(String code) { 52 | return this.getMessage(code, Locale.getDefault()); 53 | } 54 | /** 55 | * 정의된 메세지 조회 56 | * @param code - 메세지 코드 57 | * @param locale - locale 설정 58 | * @return String 59 | */ 60 | public String getMessage(String code, Locale locale) { 61 | return getReloadableResourceBundleMessageSource().getMessage(code, null, locale); 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/ImagePaginationRenderer.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.cmm; 2 | 3 | import org.egovframe.rte.ptl.mvc.tags.ui.pagination.AbstractPaginationRenderer; 4 | 5 | import javax.servlet.ServletContext; 6 | 7 | import org.springframework.web.context.ServletContextAware; 8 | /** 9 | * ImagePaginationRenderer.java 클래스 10 | * 11 | * @author 서준식 12 | * @since 2011. 9. 16. 13 | * @version 1.0 14 | * @see 15 | * 16 | *
17 |  * << 개정이력(Modification Information) >>
18 |  *   
19 |  *   수정일      수정자           수정내용
20 |  *  -------    -------------    ----------------------
21 |  *   2011. 9. 16.   서준식       이미지 경로에 ContextPath추가
22 |  * 
23 | */ 24 | public class ImagePaginationRenderer extends AbstractPaginationRenderer implements ServletContextAware{ 25 | 26 | private ServletContext servletContext; 27 | 28 | public ImagePaginationRenderer() { 29 | 30 | } 31 | 32 | public void initVariables(){ 33 | firstPageLabel = "
  •  
  • \"처음\"
  • "; 34 | previousPageLabel = "
  • \"이전\"
  • "; 35 | currentPageLabel = "
  • {0}
  • "; 36 | otherPageLabel = "
  • {2}
  • "; 37 | nextPageLabel = "
  •  \"다음\"
  • "; 38 | lastPageLabel = "
  • \"마지막\"
  • "; 39 | } 40 | 41 | 42 | 43 | public void setServletContext(ServletContext servletContext) { 44 | this.servletContext = servletContext; 45 | initVariables(); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/IncludedCompInfoVO.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.cmm; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | 6 | /** 7 | * IncludedInfo annotation을 바탕으로 화면에 표시할 정보를 구성하기 위한 VO 클래스 8 | * @author 공통컴포넌트 정진오 9 | * @since 2011.08.26 10 | * @version 2.0.0 11 | * @see 12 | * 13 | *
    14 |  * << 개정이력(Modification Information) >>
    15 |  *   
    16 |  *  수정일		수정자		수정내용
    17 |  *  -------    	--------    ---------------------------
    18 |  *  2011.08.26	정진오 		최초 생성
    19 |  *
    20 |  * 
    21 | */ 22 | @Getter 23 | @Setter 24 | public class IncludedCompInfoVO { 25 | 26 | private String name; 27 | private String listUrl; 28 | private int order; 29 | private int gid; 30 | 31 | 32 | } -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/LoginVO.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.cmm; 2 | 3 | import java.io.Serializable; 4 | 5 | import javax.validation.constraints.Email; 6 | 7 | import io.swagger.v3.oas.annotations.media.Schema; 8 | import lombok.Getter; 9 | import lombok.Setter; 10 | 11 | /** 12 | * @Class Name : LoginVO.java 13 | * @Description : Login VO class 14 | * @Modification Information 15 | * @ 16 | * @ 수정일 수정자 수정내용 17 | * @ ------- -------- --------------------------- 18 | * @ 2009.03.03 박지욱 최초 생성 19 | * 20 | * @author 공통서비스 개발팀 박지욱 21 | * @since 2009.03.03 22 | * @version 1.0 23 | * @see 24 | * 25 | */ 26 | @Schema(description = "사용자 정보 VO") 27 | @Getter 28 | @Setter 29 | public class LoginVO implements Serializable{ 30 | 31 | /** 32 | * 33 | */ 34 | private static final long serialVersionUID = -8274004534207618049L; 35 | 36 | @Schema(description = "아이디") 37 | private String id; 38 | 39 | @Schema(description = "이름") 40 | private String name; 41 | 42 | @Schema(description = "주민등록번호") 43 | private String ihidNum; 44 | 45 | @Email(regexp = "[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,3}") 46 | @Schema(description = "이메일주소") 47 | private String email; 48 | 49 | @Schema(description = "비밀번호") 50 | private String password; 51 | 52 | @Schema(description = "비밀번호 힌트") 53 | private String passwordHint; 54 | 55 | @Schema(description = "비밀번호 정답") 56 | private String passwordCnsr; 57 | 58 | @Schema(description = "사용자 구분", allowableValues = {"GNR", "ENT", "USR", "ADM"}, defaultValue = "USR") 59 | private String userSe; //사용자 구분에 ADM 추가 60 | 61 | @Schema(description = "조직(부서)ID") 62 | private String orgnztId; 63 | 64 | @Schema(description = "조직(부서)명") 65 | private String orgnztNm; 66 | 67 | @Schema(description = "고유아이디") 68 | private String uniqId; 69 | 70 | @Schema(description = "로그인 후 이동할 페이지") 71 | private String url; 72 | 73 | @Schema(description = "사용자 IP정보") 74 | private String ip; 75 | 76 | @Schema(description = "GPKI인증 DN") 77 | private String dn; 78 | 79 | @Schema(description = "그룹ID") //권한 그룹ID 추가 80 | private String groupId; 81 | 82 | @Schema(description = "그룹명") //권한 그룹명 추가 83 | private String groupNm; 84 | 85 | 86 | } 87 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/ResponseCode.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.cmm; 2 | 3 | public enum ResponseCode { 4 | 5 | SUCCESS(200, "성공했습니다."), 6 | AUTH_ERROR(403, "인가된 사용자가 아닙니다."), 7 | DELETE_ERROR(700, "삭제 중 내부 오류가 발생했습니다."), 8 | SAVE_ERROR(800, "저장시 내부 오류가 발생했습니다."), 9 | INPUT_CHECK_ERROR(900, "입력값 무결성 오류 입니다."); 10 | 11 | private int code; 12 | private String message; 13 | 14 | private ResponseCode(int code, String message) { 15 | this.code = code; 16 | this.message = message; 17 | } 18 | 19 | public int getCode() { 20 | return code; 21 | } 22 | 23 | public String getMessage() { 24 | return message; 25 | } 26 | 27 | 28 | 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/SessionVO.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.cmm; 2 | 3 | import java.io.Serializable; 4 | 5 | import lombok.Getter; 6 | import lombok.Setter; 7 | 8 | /** 9 | * 세션 VO 클래스 10 | * @author 공통서비스 개발팀 박지욱 11 | * @since 2009.03.06 12 | * @version 1.0 13 | * @see 14 | * 15 | *
    16 |  * << 개정이력(Modification Information) >>
    17 |  *
    18 |  *   수정일      수정자          수정내용
    19 |  *  -------    --------    ---------------------------
    20 |  *  2009.03.06  박지욱          최초 생성
    21 |  *
    22 |  *  
    23 | */ 24 | @Getter 25 | @Setter 26 | public class SessionVO implements Serializable { 27 | 28 | private static final long serialVersionUID = -2848741427493626376L; 29 | /** 아이디 */ 30 | private String sUserId; 31 | /** 이름 */ 32 | private String sUserNm; 33 | /** 이메일 */ 34 | private String sEmail; 35 | /** 사용자구분 */ 36 | private String sUserSe; 37 | /** 조직(부서)ID */ 38 | private String orgnztId; 39 | /** 고유아이디 */ 40 | private String uniqId; 41 | 42 | } -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/annotation/IncludedInfo.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.cmm.annotation; 2 | 3 | /** 4 | * 컴포넌트의 포함 정보 표현을 위한 annotation 클래스 5 | * 기본적으로 Controller 클래스에 annotation을 부여하되, 6 | * 하나의 Controller에 여러 개의 목록성 url mapping이 제공되는 경우에는 7 | * 메소드에 annotation을 부여한다. 8 | * @author 공통컴포넌트 정진오 9 | * @since 2011.08.26 10 | * @version 2.0.0 11 | * @see 12 | * 13 | *
    14 |  * << 개정이력(Modification Information) >>
    15 |  *   
    16 |  *  수정일		수정자		수정내용
    17 |  *  -------    	--------    ---------------------------
    18 |  *  2011.08.26	정진오 		최초 생성
    19 |  *
    20 |  * 
    21 | */ 22 | 23 | 24 | import java.lang.annotation.Retention; 25 | import java.lang.annotation.RetentionPolicy; 26 | 27 | @Retention(RetentionPolicy.RUNTIME) 28 | public @interface IncludedInfo { 29 | String name() default ""; // 컴포넌트의 한글 이름 30 | String listUrl() default ""; // 컴포넌트의 목록정보조회를 위한 URL 31 | int order() default 0; // 자동 생성되는 메뉴 목록에 표시되는 순서 32 | int gid() default 0; // 컴포넌트의 Group ID(대분류 구분) 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/filter/HTMLTagFilter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2009 MOPAS(Ministry of Public Administration and Security). 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package egovframework.com.cmm.filter; 17 | 18 | import java.io.IOException; 19 | 20 | import javax.servlet.Filter; 21 | import javax.servlet.FilterChain; 22 | import javax.servlet.FilterConfig; 23 | import javax.servlet.ServletException; 24 | import javax.servlet.ServletRequest; 25 | import javax.servlet.ServletResponse; 26 | import javax.servlet.http.HttpServletRequest; 27 | 28 | public class HTMLTagFilter implements Filter{ 29 | 30 | @SuppressWarnings("unused") 31 | private FilterConfig config; 32 | 33 | public void doFilter(ServletRequest request, ServletResponse response, 34 | FilterChain chain) throws IOException, ServletException { 35 | 36 | chain.doFilter(new HTMLTagFilterRequestWrapper((HttpServletRequest)request), response); 37 | } 38 | 39 | public void init(FilterConfig config) throws ServletException { 40 | this.config = config; 41 | } 42 | 43 | public void destroy() { 44 | 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/interceptor/AopExceptionTransfer.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.cmm.interceptor; 2 | 3 | import org.aspectj.lang.JoinPoint; 4 | import org.aspectj.lang.annotation.AfterThrowing; 5 | import org.aspectj.lang.annotation.Aspect; 6 | import org.aspectj.lang.annotation.Pointcut; 7 | 8 | import org.egovframe.rte.fdl.cmmn.aspect.ExceptionTransfer; 9 | 10 | @Aspect 11 | public class AopExceptionTransfer { 12 | private ExceptionTransfer exceptionTransfer; 13 | 14 | public void setExceptionTransfer(ExceptionTransfer exceptionTransfer) { 15 | this.exceptionTransfer = exceptionTransfer; 16 | } 17 | 18 | @Pointcut("execution(* egovframework.let..impl.*Impl.*(..)) or execution(* egovframework.com..impl.*Impl.*(..))") 19 | private void exceptionTransferService() {} 20 | 21 | @AfterThrowing(pointcut= "exceptionTransferService()", throwing="ex") 22 | public void doAfterThrowingExceptionTransferService(JoinPoint thisJoinPoint, Exception ex) throws Exception{ 23 | exceptionTransfer.transfer(thisJoinPoint, ex); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/interceptor/AuthenticInterceptor.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.cmm.interceptor; 2 | 3 | import javax.servlet.ServletException; 4 | import javax.servlet.http.HttpServletRequest; 5 | import javax.servlet.http.HttpServletResponse; 6 | 7 | import org.springframework.web.servlet.ModelAndView; 8 | import org.springframework.web.servlet.ModelAndViewDefiningException; 9 | import org.springframework.web.servlet.mvc.WebContentInterceptor; 10 | 11 | import egovframework.com.cmm.LoginVO; 12 | import egovframework.com.cmm.util.EgovUserDetailsHelper; 13 | import lombok.extern.slf4j.Slf4j; 14 | 15 | /** 16 | * 인증여부 체크 인터셉터 17 | * @author 공통서비스 개발팀 서준식 18 | * @since 2011.07.01 19 | * @version 1.0 20 | * @see 21 | * 22 | *
    23 |  * << 개정이력(Modification Information) >>
    24 |  *
    25 |  *   수정일      수정자          수정내용
    26 |  *  -------    --------    ---------------------------
    27 |  *  2011.07.01  서준식          최초 생성
    28 |  *  2011.09.07  서준식          인증이 필요없는 URL을 패스하는 로직 추가
    29 |  *  2014.06.11  이기하          인증이 필요없는 URL을 패스하는 로직 삭제(xml로 대체)
    30 |  *  
    31 | */ 32 | @Slf4j 33 | public class AuthenticInterceptor extends WebContentInterceptor { 34 | 35 | /** 36 | * 세션에 계정정보(LoginVO)가 있는지 여부로 인증 여부를 체크한다. 37 | * 계정정보(LoginVO)가 없다면, 로그인 페이지로 이동한다. 38 | */ 39 | @Override 40 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws ServletException { 41 | 42 | LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); 43 | 44 | if (loginVO.getId() != null) { 45 | 46 | log.debug("AuthenticInterceptor sessionID "+loginVO.getId()); 47 | log.debug("AuthenticInterceptor ================== "); 48 | 49 | return true; 50 | } 51 | log.debug("AuthenticInterceptor Fail!!!!!!!!!!!!================== "); 52 | 53 | ModelAndView modelAndView = new ModelAndView("redirect:http://localhost:3000/login"); 54 | throw new ModelAndViewDefiningException(modelAndView); 55 | } 56 | } -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/interceptor/CustomAuthenticInterceptor.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.cmm.interceptor; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import javax.servlet.http.HttpServletResponse; 5 | import javax.servlet.http.HttpSession; 6 | 7 | import org.springframework.web.servlet.HandlerInterceptor; 8 | 9 | import lombok.extern.slf4j.Slf4j; 10 | 11 | /** 12 | * 인증여부 체크 인터셉터 13 | * @author 공통서비스 개발팀 서준식 14 | * @since 2011.07.01 15 | * @version 1.0 16 | * @see 17 | * 18 | *
    19 |  * << 개정이력(Modification Information) >>
    20 |  *
    21 |  *   수정일      수정자          수정내용
    22 |  *  -------    --------    ---------------------------
    23 |  *  2011.07.01  서준식          최초 생성
    24 |  *  2011.09.07  서준식          인증이 필요없는 URL을 패스하는 로직 추가
    25 |  *  
    26 | */ 27 | 28 | @Slf4j 29 | public class CustomAuthenticInterceptor implements HandlerInterceptor { 30 | 31 | /** 32 | * 세션에 계정정보(LoginVO)가 있는지 여부로 인증 여부를 체크한다. 33 | * 계정정보(LoginVO)가 없다면, 로그인 페이지로 이동한다. 34 | */ 35 | @Override 36 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { 37 | 38 | HttpSession session = request.getSession(); 39 | log.debug("CustomAuthenticInterceptor sessionID " + session.getId()); 40 | log.debug("CustomAuthenticInterceptor ================== "); 41 | 42 | return true; 43 | } 44 | 45 | } -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/service/CmmnDetailCode.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.cmm.service; 2 | 3 | import java.io.Serializable; 4 | 5 | import lombok.Getter; 6 | import lombok.Setter; 7 | 8 | /** 9 | * 공통상세코드 모델 클래스 10 | * @author 공통서비스 개발팀 이중호 11 | * @since 2009.04.01 12 | * @version 1.0 13 | * @see 14 | * 15 | *
    16 |  * << 개정이력(Modification Information) >>
    17 |  *
    18 |  *   수정일      수정자           수정내용
    19 |  *  -------    --------    ---------------------------
    20 |  *   2009.04.01  이중호          최초 생성
    21 |  *
    22 |  * 
    23 | */ 24 | @Getter 25 | @Setter 26 | public class CmmnDetailCode implements Serializable { 27 | 28 | private static final long serialVersionUID = -6508801327314181679L; 29 | 30 | /* 31 | * 코드ID 32 | */ 33 | private String codeId = ""; 34 | 35 | /* 36 | * 코드ID명 37 | */ 38 | private String codeIdNm = ""; 39 | 40 | /* 41 | * 코드 42 | */ 43 | private String code = ""; 44 | 45 | /* 46 | * 코드명 47 | */ 48 | private String codeNm = ""; 49 | 50 | /* 51 | * 코드설명 52 | */ 53 | private String codeDc = ""; 54 | 55 | /* 56 | * 사용여부 57 | */ 58 | private String useAt = ""; 59 | 60 | /* 61 | * 최초등록자ID 62 | */ 63 | private String frstRegisterId = ""; 64 | 65 | /* 66 | * 최종수정자ID 67 | */ 68 | private String lastUpdusrId = ""; 69 | 70 | } -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/service/EgovCmmUseService.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.cmm.service; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | import egovframework.com.cmm.ComDefaultCodeVO; 7 | 8 | 9 | 10 | /** 11 | * 12 | * 공통코드등 전체 업무에서 공용해서 사용해야 하는 서비스를 정의하기 위한 서비스 인터페이스 13 | * @author 공통서비스 개발팀 이삼섭 14 | * @since 2009.04.01 15 | * @version 1.0 16 | * @see 17 | * 18 | *
    19 |  * << 개정이력(Modification Information) >>
    20 |  *
    21 |  *   수정일      수정자           수정내용
    22 |  *  -------    --------    ---------------------------
    23 |  *   2009.03.11  이삼섭          최초 생성
    24 |  *
    25 |  * 
    26 | */ 27 | public interface EgovCmmUseService { 28 | 29 | /** 30 | * 공통코드를 조회한다. 31 | * 32 | * @param vo 33 | * @return List(코드) 34 | * @throws Exception 35 | */ 36 | public List selectCmmCodeDetail(ComDefaultCodeVO vo) throws Exception; 37 | 38 | /** 39 | * ComDefaultCodeVO의 리스트를 받아서 여러개의 코드 리스트를 맵에 담아서 리턴한다. 40 | * 41 | * @param voList 42 | * @return Map(코드) 43 | * @throws Exception 44 | */ 45 | public Map> selectCmmCodeDetails(List voList) throws Exception; 46 | 47 | /** 48 | * 조직정보를 코드형태로 리턴한다. 49 | * 50 | * @param 조회조건정보 vo 51 | * @return 조직정보 List 52 | * @throws Exception 53 | */ 54 | public List selectOgrnztIdDetail(ComDefaultCodeVO vo) throws Exception; 55 | 56 | /** 57 | * 그룹정보를 코드형태로 리턴한다. 58 | * 59 | * @param 조회조건정보 vo 60 | * @return 그룹정보 List 61 | * @throws Exception 62 | */ 63 | public List selectGroupIdDetail(ComDefaultCodeVO vo) throws Exception; 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/service/EgovFileMngService.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.cmm.service; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | /** 7 | * @Class Name : EgovFileMngService.java 8 | * @Description : 파일정보의 관리를 위한 서비스 인터페이스 9 | * @Modification Information 10 | * 11 | * 수정일 수정자 수정내용 12 | * ------- ------- ------------------- 13 | * 2009. 3. 25. 이삼섭 최초생성 14 | * 15 | * @author 공통 서비스 개발팀 이삼섭 16 | * @since 2009. 3. 25. 17 | * @version 18 | * @see 19 | * 20 | */ 21 | public interface EgovFileMngService { 22 | 23 | /** 24 | * 파일에 대한 목록을 조회한다. 25 | * 26 | * @param fvo 27 | * @return 28 | * @throws Exception 29 | */ 30 | public List selectFileInfs(FileVO fvo) throws Exception; 31 | 32 | /** 33 | * 하나의 파일에 대한 정보(속성 및 상세)를 등록한다. 34 | * 35 | * @param fvo 36 | * @throws Exception 37 | */ 38 | public String insertFileInf(FileVO fvo) throws Exception; 39 | 40 | /** 41 | * 여러 개의 파일에 대한 정보(속성 및 상세)를 등록한다. 42 | * 43 | * @param fvoList 44 | * @throws Exception 45 | */ 46 | public String insertFileInfs(List fvoList) throws Exception; 47 | 48 | /** 49 | * 여러 개의 파일에 대한 정보(속성 및 상세)를 수정한다. 50 | * 51 | * @param fvoList 52 | * @throws Exception 53 | */ 54 | public void updateFileInfs(List fvoList) throws Exception; 55 | 56 | /** 57 | * 여러 개의 파일을 삭제한다. 58 | * 59 | * @param fvoList 60 | * @throws Exception 61 | */ 62 | public void deleteFileInfs(List fvoList) throws Exception; 63 | 64 | /** 65 | * 하나의 파일을 삭제한다. 66 | * 67 | * @param fvo 68 | * @throws Exception 69 | */ 70 | public void deleteFileInf(FileVO fvo) throws Exception; 71 | 72 | /** 73 | * 파일에 대한 상세정보를 조회한다. 74 | * 75 | * @param fvo 76 | * @return 77 | * @throws Exception 78 | */ 79 | public FileVO selectFileInf(FileVO fvo) throws Exception; 80 | 81 | /** 82 | * 파일 구분자에 대한 최대값을 구한다. 83 | * 84 | * @param fvo 85 | * @return 86 | * @throws Exception 87 | */ 88 | public int getMaxFileSN(FileVO fvo) throws Exception; 89 | 90 | /** 91 | * 전체 파일을 삭제한다. 92 | * 93 | * @param fvo 94 | * @throws Exception 95 | */ 96 | public void deleteAllFileInf(FileVO fvo) throws Exception; 97 | 98 | /** 99 | * 파일명 검색에 대한 목록을 조회한다. 100 | * 101 | * @param fvo 102 | * @return 103 | * @throws Exception 104 | */ 105 | public Map selectFileListByFileNm(FileVO fvo) throws Exception; 106 | 107 | /** 108 | * 이미지 파일에 대한 목록을 조회한다. 109 | * 110 | * @param vo 111 | * @return 112 | * @throws Exception 113 | */ 114 | public List selectImageFileList(FileVO vo) throws Exception; 115 | } 116 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/service/EgovUserDetailsService.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.cmm.service; 2 | 3 | import java.util.List; 4 | 5 | public interface EgovUserDetailsService { 6 | 7 | /** 8 | * 인증된 사용자객체를 VO형식으로 가져온다. 9 | * @return Object - 사용자 ValueObject 10 | */ 11 | public Object getAuthenticatedUser(); 12 | 13 | /** 14 | * 인증된 사용자의 권한 정보를 가져온다. 15 | * 예) [ROLE_ADMIN, ROLE_USER, ROLE_A, ROLE_B, ROLE_RESTRICTED, IS_AUTHENTICATED_FULLY, IS_AUTHENTICATED_REMEMBERED, IS_AUTHENTICATED_ANONYMOUSLY] 16 | * @return List - 사용자 권한정보 목록 17 | */ 18 | public List getAuthorities(); 19 | 20 | /** 21 | * 인증된 사용자 여부를 체크한다. 22 | * @return Boolean - 인증된 사용자 여부(TRUE / FALSE) 23 | */ 24 | public Boolean isAuthenticated(); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/service/FileVO.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.cmm.service; 2 | 3 | import java.io.Serializable; 4 | 5 | import lombok.Getter; 6 | import lombok.Setter; 7 | import org.apache.commons.lang3.builder.ToStringBuilder; 8 | 9 | import io.swagger.v3.oas.annotations.media.Schema; 10 | 11 | /** 12 | * @Class Name : FileVO.java 13 | * @Description : 파일정보 처리를 위한 VO 클래스 14 | * @Modification Information 15 | * 16 | * 수정일 수정자 수정내용 17 | * ------- ------- ------------------- 18 | * 2009. 3. 25. 이삼섭 19 | * 20 | * @author 공통 서비스 개발팀 이삼섭 21 | * @since 2009. 3. 25. 22 | * @version 23 | * @see 24 | * 25 | */ 26 | @Schema(description = "파일 정보 VO") 27 | @Getter 28 | @Setter 29 | public class FileVO implements Serializable { 30 | 31 | /** 32 | * serialVersion UID 33 | */ 34 | private static final long serialVersionUID = -287950405903719128L; 35 | 36 | @Schema(description = "첨부파일 아이디") 37 | public String atchFileId = ""; 38 | 39 | @Schema(description = "생성일자") 40 | public String creatDt = ""; 41 | 42 | @Schema(description = "파일내용") 43 | public String fileCn = ""; 44 | 45 | @Schema(description = "파일확장자") 46 | public String fileExtsn = ""; 47 | 48 | @Schema(description = "파일크기") 49 | public String fileMg = ""; 50 | 51 | @Schema(description = "파일연번") 52 | public String fileSn = ""; 53 | 54 | @Schema(description = "파일저장경로") 55 | public String fileStreCours = ""; 56 | 57 | @Schema(description = "원파일명") 58 | public String orignlFileNm = ""; 59 | 60 | @Schema(description = "저장파일명") 61 | public String streFileNm = ""; 62 | 63 | /** 64 | * toString 메소드를 대치한다. 65 | */ 66 | public String toString() { 67 | return ToStringBuilder.reflectionToString(this); 68 | } 69 | 70 | } 71 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/service/Globals.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.cmm.service; 2 | 3 | /** 4 | * Class Name : Globals.java 5 | * Description : 시스템 구동 시 프로퍼티를 통해 사용될 전역변수를 정의한다. 6 | * Modification Information 7 | * 8 | * 수정일 수정자 수정내용 9 | * ------- -------- --------------------------- 10 | * 2009.01.19 박지욱 최초 생성 11 | * 12 | * @author 공통 서비스 개발팀 박지욱 13 | * @since 2009. 01. 19 14 | * @version 1.0 15 | * @see 16 | * 17 | */ 18 | 19 | public class Globals { 20 | //파일 업로드 원 파일명 21 | public static final String ORIGIN_FILE_NM = "originalFileName"; 22 | //파일 확장자 23 | public static final String FILE_EXT = "fileExtension"; 24 | //파일크기 25 | public static final String FILE_SIZE = "fileSize"; 26 | //업로드된 파일명 27 | public static final String UPLOAD_FILE_NM = "uploadFileName"; 28 | //파일경로 29 | public static final String FILE_PATH = "filePath"; 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/service/IntermediateResultVO.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.cmm.service; 2 | 3 | import com.fasterxml.jackson.annotation.JsonInclude; 4 | 5 | import egovframework.com.cmm.ResponseCode; 6 | import io.swagger.v3.oas.annotations.media.Schema; 7 | import lombok.Getter; 8 | import lombok.Setter; 9 | /** 10 | * 제네릭으로 응답 객체를 받아 동적으로 처리하기 위한 VO 클래스 입니다. 11 | * 추후 응답 객체로 모두 변환이 완료되면 ResultVO를 대체하여 사용합니다. 12 | * 13 | * result 반환 문제로 인해 사용되는 임시 클래스 입니다. 14 | * 15 | * @author 김재섭(nirsa) 16 | * @since 2025.04.10 17 | * @version 1.0 18 | * @see 19 | * 20 | *
    21 |  * << 개정이력(Modification Information) >>
    22 |  *   
    23 |  *   수정일          수정자         수정내용
    24 |  *   ----------    ------------     -------------------
    25 |  *   2025.04.10    김재섭(nirsa)      최초 생성 
    26 |  *
    27 |  * 
    28 | */ 29 | 30 | 31 | @Schema(description = "응답 객체 VO (최종 구조로 가는 중간 단계 VO)") 32 | @Getter 33 | @Setter 34 | public class IntermediateResultVO { 35 | 36 | @Schema(description = "응답 코드", example = "0") 37 | private int resultCode; 38 | 39 | @Schema(description = "응답 메시지", example = "OK") 40 | private String resultMessage; 41 | 42 | @JsonInclude(JsonInclude.Include.NON_NULL) 43 | @Schema(description = "응답 객체") 44 | private T result; 45 | 46 | public static IntermediateResultVO success(T data) { 47 | IntermediateResultVO result = new IntermediateResultVO<>(); 48 | result.setResultCode(ResponseCode.SUCCESS.getCode()); 49 | result.setResultMessage(ResponseCode.SUCCESS.getMessage()); 50 | result.setResult(data); 51 | return result; 52 | } 53 | 54 | public static IntermediateResultVO inputCheckError(T data) { 55 | IntermediateResultVO result = new IntermediateResultVO<>(); 56 | result.setResultCode(ResponseCode.INPUT_CHECK_ERROR.getCode()); 57 | result.setResultMessage(ResponseCode.INPUT_CHECK_ERROR.getMessage()); 58 | result.setResult(data); 59 | return result; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/service/ResultVO.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.cmm.service; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | import io.swagger.v3.oas.annotations.media.Schema; 7 | import lombok.Getter; 8 | import lombok.Setter; 9 | 10 | @Schema(description = "응답 객체 VO") 11 | @Getter 12 | @Setter 13 | public class ResultVO { 14 | 15 | @Schema(description = "응답 코드") 16 | private int resultCode = 0; 17 | 18 | @Schema(description = "응답 메시지") 19 | private String resultMessage = "OK"; 20 | private Map result = new HashMap(); 21 | 22 | public void putResult(String key, Object value) { 23 | result.put(key, value); 24 | } 25 | 26 | public Object getResult(String key) { 27 | return this.result.get(key); 28 | } 29 | 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/service/impl/CmmUseDAO.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.cmm.service.impl; 2 | 3 | import java.util.List; 4 | 5 | import org.egovframe.rte.psl.dataaccess.EgovAbstractMapper; 6 | import org.springframework.stereotype.Repository; 7 | 8 | import egovframework.com.cmm.ComDefaultCodeVO; 9 | import egovframework.com.cmm.service.CmmnDetailCode; 10 | 11 | /** 12 | * @Class Name : CmmUseDAO.java 13 | * @Description : 공통코드등 전체 업무에서 공용해서 사용해야 하는 서비스를 정의하기위한 데이터 접근 클래스 14 | * @Modification Information 15 | * 16 | * 수정일 수정자 수정내용 17 | * ------- ------- ------------------- 18 | * 2009. 3. 11. 이삼섭 19 | * 20 | * @author 공통 서비스 개발팀 이삼섭 21 | * @since 2009. 3. 11. 22 | * @version 23 | * @see 24 | * 25 | */ 26 | @Repository("cmmUseDAO") 27 | public class CmmUseDAO extends EgovAbstractMapper { 28 | 29 | /** 30 | * 주어진 조건에 따른 공통코드를 불러온다. 31 | * 32 | * @param vo 33 | * @return 34 | * @throws Exception 35 | */ 36 | public List selectCmmCodeDetail(ComDefaultCodeVO vo) throws Exception { 37 | return selectList("CmmUseDAO.selectCmmCodeDetail", vo); 38 | } 39 | 40 | /** 41 | * 공통코드로 사용할 조직정보를 를 불러온다. 42 | * 43 | * @param vo 44 | * @return 45 | * @throws Exception 46 | */ 47 | public List selectOgrnztIdDetail(ComDefaultCodeVO vo) throws Exception { 48 | return selectList("CmmUseDAO.selectOgrnztIdDetail", vo); 49 | } 50 | 51 | /** 52 | * 공통코드로 사용할그룹정보를 를 불러온다. 53 | * 54 | * @param vo 55 | * @return 56 | * @throws Exception 57 | */ 58 | public List selectGroupIdDetail(ComDefaultCodeVO vo) throws Exception { 59 | return selectList("CmmUseDAO.selectGroupIdDetail", vo); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/service/impl/EgovCmmUseServiceImpl.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.cmm.service.impl; 2 | 3 | import java.util.HashMap; 4 | import java.util.Iterator; 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | import egovframework.com.cmm.ComDefaultCodeVO; 9 | import egovframework.com.cmm.service.CmmnDetailCode; 10 | import egovframework.com.cmm.service.EgovCmmUseService; 11 | 12 | import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl; 13 | 14 | import javax.annotation.Resource; 15 | 16 | import org.springframework.stereotype.Service; 17 | 18 | /** 19 | * @Class Name : EgovCmmUseServiceImpl.java 20 | * @Description : 공통코드등 전체 업무에서 공용해서 사용해야 하는 서비스를 정의하기위한 서비스 구현 클래스 21 | * @Modification Information 22 | * 23 | * 수정일 수정자 수정내용 24 | * ------- ------- ------------------- 25 | * 2009. 3. 11. 이삼섭 26 | * 27 | * @author 공통 서비스 개발팀 이삼섭 28 | * @since 2009. 3. 11. 29 | * @version 30 | * @see 31 | * 32 | */ 33 | @Service("EgovCmmUseService") 34 | public class EgovCmmUseServiceImpl extends EgovAbstractServiceImpl implements EgovCmmUseService { 35 | 36 | @Resource(name = "cmmUseDAO") 37 | private CmmUseDAO cmmUseDAO; 38 | 39 | /** 40 | * 공통코드를 조회한다. 41 | * 42 | * @param vo 43 | * @return 44 | * @throws Exception 45 | */ 46 | @Override 47 | public List selectCmmCodeDetail(ComDefaultCodeVO vo) throws Exception { 48 | return cmmUseDAO.selectCmmCodeDetail(vo); 49 | } 50 | 51 | /** 52 | * ComDefaultCodeVO의 리스트를 받아서 여러개의 코드 리스트를 맵에 담아서 리턴한다. 53 | * 54 | * @param voList 55 | * @return 56 | * @throws Exception 57 | */ 58 | @Override 59 | public Map> selectCmmCodeDetails(List voList) throws Exception { 60 | ComDefaultCodeVO vo; 61 | Map> map = new HashMap>(); 62 | 63 | Iterator iter = voList.iterator(); 64 | while (iter.hasNext()) { 65 | vo = (ComDefaultCodeVO) iter.next(); 66 | map.put(vo.getCodeId(), cmmUseDAO.selectCmmCodeDetail(vo)); 67 | } 68 | 69 | return map; 70 | } 71 | 72 | /** 73 | * 조직정보를 코드형태로 리턴한다. 74 | * 75 | * @param 조회조건정보 vo 76 | * @return 조직정보 List 77 | * @throws Exception 78 | */ 79 | @Override 80 | public List selectOgrnztIdDetail(ComDefaultCodeVO vo) throws Exception { 81 | return cmmUseDAO.selectOgrnztIdDetail(vo); 82 | } 83 | 84 | /** 85 | * 그룹정보를 코드형태로 리턴한다. 86 | * 87 | * @param 조회조건정보 vo 88 | * @return 그룹정보 List 89 | * @throws Exception 90 | */ 91 | @Override 92 | public List selectGroupIdDetail(ComDefaultCodeVO vo) throws Exception { 93 | return cmmUseDAO.selectGroupIdDetail(vo); 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/service/impl/EgovTestUserDetailsServiceImpl.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.cmm.service.impl; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import egovframework.com.cmm.LoginVO; 7 | import egovframework.com.cmm.service.EgovUserDetailsService; 8 | 9 | import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl; 10 | 11 | /** 12 | * 13 | * @author 공통서비스 개발팀 서준식 14 | * @since 2011. 8. 12. 15 | * @version 1.0 16 | * @see 17 | * 18 | *
    19 |  * 개정이력(Modification Information)
    20 |  *
    21 |  *   수정일      수정자          수정내용
    22 |  *  -------    --------    ---------------------------
    23 |  *  2011. 8. 12.    서준식        최초생성
    24 |  *
    25 |  *  
    26 | */ 27 | 28 | public class EgovTestUserDetailsServiceImpl extends EgovAbstractServiceImpl implements 29 | EgovUserDetailsService { 30 | 31 | @Override 32 | public Object getAuthenticatedUser() { 33 | 34 | LoginVO loginVO = new LoginVO(); 35 | loginVO.setId("TEST1"); 36 | loginVO.setPassword("raHLBnHFcunwNzcDcfad4PhD11hHgXSUr7fc1Jk9uoQ="); 37 | loginVO.setUserSe("USR"); 38 | loginVO.setEmail("egovframe@nia.or.kr"); 39 | loginVO.setIhidNum(""); 40 | loginVO.setName("더미사용자"); 41 | loginVO.setOrgnztId("ORGNZT_0000000000000"); 42 | loginVO.setUniqId("USRCNFRM_00000000000"); 43 | return loginVO; 44 | 45 | // return 46 | // RequestContextHolder.getRequestAttributes().getAttribute("loginVO", 47 | // RequestAttributes.SCOPE_SESSION); 48 | 49 | } 50 | 51 | @Override 52 | public List getAuthorities() { 53 | 54 | // 권한 설정을 리턴한다. 55 | 56 | List listAuth = new ArrayList(); 57 | listAuth.add("IS_AUTHENTICATED_ANONYMOUSLY"); 58 | listAuth.add("IS_AUTHENTICATED_FULLY"); 59 | listAuth.add("IS_AUTHENTICATED_REMEMBERED"); 60 | listAuth.add("ROLE_ADMIN"); 61 | listAuth.add("ROLE_ANONYMOUS"); 62 | listAuth.add("ROLE_RESTRICTED"); 63 | listAuth.add("ROLE_USER"); 64 | 65 | return listAuth; 66 | } 67 | 68 | @Override 69 | public Boolean isAuthenticated() { 70 | // 인증된 유저인지 확인한다. 71 | 72 | /*if (RequestContextHolder.getRequestAttributes() == null) { 73 | return false; 74 | } else { 75 | 76 | if (RequestContextHolder.getRequestAttributes().getAttribute( 77 | "loginVO", RequestAttributes.SCOPE_SESSION) == null) { 78 | return false; 79 | } else { 80 | return true; 81 | } 82 | }*/ 83 | 84 | return true; 85 | } 86 | 87 | } 88 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/service/impl/EgovUserDetailsSessionServiceImpl.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.cmm.service.impl; 2 | 3 | import java.util.List; 4 | 5 | import egovframework.com.cmm.service.EgovUserDetailsService; 6 | import egovframework.com.cmm.util.EgovUserDetailsHelper; 7 | 8 | import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl; 9 | 10 | /** 11 | * 12 | * @author 공통서비스 개발팀 서준식 13 | * @since 2011. 6. 25. 14 | * @version 1.0 15 | * @see 16 | * 17 | *
    18 |  * 개정이력(Modification Information)
    19 |  *
    20 |  *   수정일      수정자          수정내용
    21 |  *  -------    --------    ---------------------------
    22 |  *  2011. 8. 12.    서준식        최초생성
    23 |  *
    24 |  *  
    25 | */ 26 | 27 | public class EgovUserDetailsSessionServiceImpl extends EgovAbstractServiceImpl implements 28 | EgovUserDetailsService { 29 | 30 | @Override 31 | public Object getAuthenticatedUser() { 32 | if (EgovUserDetailsHelper.isAuthenticated()) { 33 | return EgovUserDetailsHelper.getAuthenticatedUser(); 34 | } 35 | return null; 36 | } 37 | 38 | @Override 39 | public List getAuthorities() { 40 | // return listAuth; 41 | return EgovUserDetailsHelper.getAuthorities(); 42 | } 43 | 44 | @Override 45 | public Boolean isAuthenticated() { 46 | // 인증된 유저인지 확인한다. 47 | return EgovUserDetailsHelper.isAuthenticated(); 48 | 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/util/EgovBasicLogger.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.cmm.util; 2 | 3 | import java.util.logging.Level; 4 | import java.util.logging.Logger; 5 | 6 | /** 7 | * Utility class to support to logging information 8 | * @author Vincent Han 9 | * @since 2014.09.18 10 | * @version 1.0 11 | * @see 12 | * 13 | *
    14 |  * << 개정이력(Modification Information) >>
    15 |  *   
    16 |  *   수정일        수정자       수정내용
    17 |  *  -------       --------    ---------------------------
    18 |  *   2014.09.18	표준프레임워크센터	최초 생성
    19 |  *
    20 |  * 
    21 | */ 22 | public class EgovBasicLogger { 23 | private static final Level IGNORE_INFO_LEVEL = Level.OFF; 24 | private static final Level DEBUG_INFO_LEVEL = Level.FINEST; 25 | private static final Level INFO_INFO_LEVEL = Level.INFO; 26 | 27 | private static final Logger ignoreLogger = Logger.getLogger("ignore"); 28 | private static final Logger debugLogger = Logger.getLogger("debug"); 29 | private static final Logger infoLogger = Logger.getLogger("info"); 30 | 31 | /** 32 | * 기록이나 처리가 불필요한 경우 사용. 33 | * @param message 34 | * @param exception 35 | */ 36 | public static void ignore(String message, Exception exception) { 37 | if (exception == null) { 38 | ignoreLogger.log(IGNORE_INFO_LEVEL, message); 39 | } else { 40 | ignoreLogger.log(IGNORE_INFO_LEVEL, message, exception); 41 | } 42 | } 43 | 44 | /** 45 | * 기록이나 처리가 불필요한 경우 사용. 46 | * @param message 47 | * @param exception 48 | */ 49 | public static void ignore(String message) { 50 | ignore(message, null); 51 | } 52 | 53 | /** 54 | * 디버그 정보를 기록하는 경우 사용. 55 | * @param message 56 | * @param exception 57 | */ 58 | public static void debug(String message, Exception exception) { 59 | if (exception == null) { 60 | debugLogger.log(DEBUG_INFO_LEVEL, message); 61 | } else { 62 | debugLogger.log(DEBUG_INFO_LEVEL, message, exception); 63 | } 64 | } 65 | 66 | /** 67 | * 디버그 정보를 기록하는 경우 사용. 68 | * @param message 69 | * @param exception 70 | */ 71 | public static void debug(String message) { 72 | debug(message, null); 73 | } 74 | 75 | /** 76 | * 일반적이 정보를 기록하는 경우 사용. 77 | * @param message 78 | * @param exception 79 | */ 80 | public static void info(String message) { 81 | infoLogger.log(INFO_INFO_LEVEL, message); 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/util/EgovIdGnrBuilder.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.cmm.util; 2 | 3 | import javax.sql.DataSource; 4 | 5 | import org.egovframe.rte.fdl.idgnr.impl.EgovTableIdGnrServiceImpl; 6 | import org.egovframe.rte.fdl.idgnr.impl.strategy.EgovIdGnrStrategyImpl; 7 | 8 | /** 9 | * @ClassName : EgovIdGnrBuilder.java 10 | * @Description : IdGen 정보 builder 11 | * 12 | * @author : 윤주호 13 | * @since : 2021. 7. 20 14 | * @version : 1.0 15 | * 16 | *
    17 |  * << 개정이력(Modification Information) >>
    18 |  *
    19 |  *   수정일              수정자               수정내용
    20 |  *  -------------  ------------   ---------------------
    21 |  *   2021. 7. 20    윤주호               최초 생성
    22 |  * 
    23 | * 24 | */ 25 | public class EgovIdGnrBuilder { 26 | 27 | // TODO : 기본값 설정, 예외처리 필요 28 | 29 | private DataSource dataSource; 30 | private EgovIdGnrStrategyImpl egovIdGnrStrategyImpl; 31 | 32 | private String preFix; 33 | private int cipers; 34 | private char fillChar; 35 | 36 | private int blockSize; 37 | private String table; 38 | private String tableName; 39 | 40 | public EgovIdGnrBuilder setDataSource(DataSource dataSource) { 41 | this.dataSource = dataSource; 42 | return this; 43 | } 44 | 45 | public EgovIdGnrBuilder setEgovIdGnrStrategyImpl(EgovIdGnrStrategyImpl egovIdGnrStrategyImpl) { 46 | this.egovIdGnrStrategyImpl = egovIdGnrStrategyImpl; 47 | return this; 48 | } 49 | 50 | public EgovIdGnrBuilder setPreFix(String preFix) { 51 | this.preFix = preFix; 52 | return this; 53 | } 54 | public EgovIdGnrBuilder setCipers(int cipers) { 55 | this.cipers = cipers; 56 | return this; 57 | } 58 | public EgovIdGnrBuilder setFillChar(char fillChar) { 59 | this.fillChar = fillChar; 60 | return this; 61 | } 62 | public EgovIdGnrBuilder setBlockSize(int blockSize) { 63 | this.blockSize = blockSize; 64 | return this; 65 | } 66 | public EgovIdGnrBuilder setTable(String table) { 67 | this.table = table; 68 | return this; 69 | } 70 | public EgovIdGnrBuilder setTableName(String tableName) { 71 | this.tableName = tableName; 72 | return this; 73 | } 74 | 75 | public EgovTableIdGnrServiceImpl build() { 76 | 77 | EgovTableIdGnrServiceImpl egovTableIdGnrServiceImpl = new EgovTableIdGnrServiceImpl(); 78 | egovTableIdGnrServiceImpl.setDataSource(dataSource); 79 | if(egovIdGnrStrategyImpl != null) { 80 | egovIdGnrStrategyImpl = new EgovIdGnrStrategyImpl(); 81 | egovIdGnrStrategyImpl.setPrefix(preFix); 82 | egovIdGnrStrategyImpl.setCipers(cipers); 83 | egovIdGnrStrategyImpl.setFillChar(fillChar); 84 | 85 | egovTableIdGnrServiceImpl.setStrategy(egovIdGnrStrategyImpl); 86 | } 87 | egovTableIdGnrServiceImpl.setBlockSize(blockSize); 88 | egovTableIdGnrServiceImpl.setTable(table); 89 | egovTableIdGnrServiceImpl.setTableName(tableName); 90 | 91 | return egovTableIdGnrServiceImpl; 92 | } 93 | 94 | 95 | 96 | } 97 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/util/EgovUserDetailsHelper.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.cmm.util; 2 | 3 | import java.util.List; 4 | import java.util.stream.Collectors; 5 | 6 | import org.springframework.security.core.Authentication; 7 | import org.springframework.security.core.GrantedAuthority; 8 | import org.springframework.security.core.context.SecurityContextHolder; 9 | import egovframework.com.cmm.LoginVO; 10 | 11 | /** 12 | * EgovUserDetails Helper 클래스 13 | * 14 | * @author sjyoon 15 | * @since 2009.06.01 16 | * @version 1.0 17 | * @see 18 | * 19 | *
    20 |  * << 개정이력(Modification Information) >>
    21 |  *
    22 |  *   수정일      수정자           수정내용
    23 |  *  -------    -------------    ----------------------
    24 |  *   2009.03.10  sjyoon    최초 생성
    25 |  *   2011.08.31  JJY            경량환경 템플릿 커스터마이징버전 생성
    26 |  *
    27 |  * 
    28 | */ 29 | 30 | public class EgovUserDetailsHelper { 31 | 32 | /** 33 | * 인증된 사용자객체를 VO형식으로 가져온다. 34 | * @return Object - 사용자 ValueObject 35 | */ 36 | public static Object getAuthenticatedUser() { 37 | Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); 38 | return (LoginVO) authentication.getPrincipal(); 39 | 40 | } 41 | 42 | /** 43 | * 인증된 사용자의 권한 정보를 가져온다. 44 | * 예) [ROLE_ADMIN, ROLE_USER, ROLE_A, ROLE_B, ROLE_RESTRICTED, IS_AUTHENTICATED_FULLY, IS_AUTHENTICATED_REMEMBERED, IS_AUTHENTICATED_ANONYMOUSLY] 45 | * @return List - 사용자 권한정보 목록 46 | */ 47 | public static List getAuthorities() { 48 | Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); 49 | return authentication.getAuthorities().stream().map(GrantedAuthority::getAuthority).collect(Collectors.toList()); 50 | } 51 | 52 | /** 53 | * 인증된 사용자 여부를 체크한다. 54 | * @return Boolean - 인증된 사용자 여부(TRUE / FALSE) 55 | */ 56 | public static Boolean isAuthenticated() { 57 | return EgovUserDetailsHelper.getAuthenticatedUser()!=null? Boolean.TRUE : Boolean.FALSE ; 58 | 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/util/ResultVoHelper.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.cmm.util; 2 | 3 | import java.util.Map; 4 | 5 | import org.springframework.stereotype.Component; 6 | 7 | import egovframework.com.cmm.ResponseCode; 8 | import egovframework.com.cmm.service.ResultVO; 9 | /** 10 | * ResultVO 생성을 돕는 헬퍼 유틸리티 클래스 11 | * 공통 응답 객체(ResultVO)를 표준 구조로 생성할 수 있도록 사용하는 클래스 입니다. 12 | * 13 | * @author 김재섭(nirsa) 14 | * @since 2025.04.06 15 | * @version 1.0 16 | * @see 17 | * 18 | *
    19 |  * << 개정이력(Modification Information) >>
    20 |  *   
    21 |  *   수정일          수정자         수정내용
    22 |  *   ----------    ------------     -------------------
    23 |  *   2025.04.06    김재섭(nirsa)      최초 생성 
    24 |  *
    25 |  * 
    26 | */ 27 | 28 | @Component 29 | public class ResultVoHelper { 30 | /** 31 | * Map 기반 결과 데이터를 ResultVO로 생성한다. 32 | * 33 | * @param resultMap 결과 데이터 Map 34 | * @param code 응답 코드 (ResponseCode) 35 | * @return 생성된 ResultVO 객체 36 | */ 37 | public ResultVO buildFromMap(Map resultMap, ResponseCode code) { 38 | ResultVO resultVO = new ResultVO(); 39 | resultVO.setResult(resultMap); 40 | resultVO.setResultCode(code.getCode()); 41 | resultVO.setResultMessage(code.getMessage()); 42 | return resultVO; 43 | } 44 | 45 | /** 46 | * 이미 생성된 ResultVO 객체에 응답 코드 및 메시지를 설정한다. 47 | * 48 | * @param resultVO 결과 VO 객체 49 | * @param code 응답 코드 (ResponseCode) 50 | * @return 코드가 적용된 ResultVO 객체 51 | */ 52 | public ResultVO buildFromResultVO(ResultVO resultVO, ResponseCode code) { 53 | resultVO.setResultCode(code.getCode()); 54 | resultVO.setResultMessage(code.getMessage()); 55 | return resultVO; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/cmm/web/EgovBindingInitializer.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.cmm.web; 2 | 3 | import java.text.SimpleDateFormat; 4 | import java.util.Date; 5 | 6 | import org.springframework.beans.propertyeditors.CustomDateEditor; 7 | import org.springframework.beans.propertyeditors.StringTrimmerEditor; 8 | import org.springframework.web.bind.WebDataBinder; 9 | import org.springframework.web.bind.support.WebBindingInitializer; 10 | 11 | public class EgovBindingInitializer implements WebBindingInitializer { 12 | 13 | @Override 14 | public void initBinder(WebDataBinder binder) { 15 | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); 16 | dateFormat.setLenient(false); 17 | binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, false)); 18 | binder.registerCustomEditor(String.class, new StringTrimmerEditor(false)); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/config/EgovConfigApp.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.config; 2 | 3 | import org.springframework.context.annotation.Configuration; 4 | import org.springframework.context.annotation.Import; 5 | import org.springframework.context.annotation.PropertySource; 6 | import org.springframework.context.annotation.PropertySources; 7 | 8 | @Configuration 9 | @Import({ 10 | EgovConfigAppAspect.class, 11 | EgovConfigAppCommon.class, 12 | EgovConfigAppDatasource.class, 13 | EgovConfigAppIdGen.class, 14 | EgovConfigAppProperties.class, 15 | EgovConfigAppMapper.class, 16 | EgovConfigAppTransaction.class, 17 | EgovConfigAppValidator.class, 18 | EgovConfigAppWhitelist.class 19 | }) 20 | @PropertySources({ 21 | @PropertySource("classpath:/application.properties") 22 | }) //CAUTION: min JDK 8 23 | public class EgovConfigApp { 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/config/EgovConfigAppMapper.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.config; 2 | 3 | import java.io.IOException; 4 | 5 | import javax.annotation.PostConstruct; 6 | import javax.sql.DataSource; 7 | 8 | import org.apache.ibatis.session.SqlSessionFactory; 9 | import org.mybatis.spring.SqlSessionFactoryBean; 10 | import org.mybatis.spring.SqlSessionTemplate; 11 | import org.springframework.beans.factory.annotation.Autowired; 12 | import org.springframework.beans.factory.annotation.Qualifier; 13 | import org.springframework.context.annotation.Bean; 14 | import org.springframework.context.annotation.Configuration; 15 | import org.springframework.context.annotation.Lazy; 16 | import org.springframework.context.annotation.PropertySource; 17 | import org.springframework.context.annotation.PropertySources; 18 | import org.springframework.core.env.Environment; 19 | import org.springframework.core.io.support.PathMatchingResourcePatternResolver; 20 | import org.springframework.jdbc.support.lob.DefaultLobHandler; 21 | 22 | /** 23 | * @ClassName : EgovConfigAppMapper.java 24 | * @Description : Mapper 설정 25 | * 26 | * @author : 윤주호 27 | * @since : 2021. 7. 20 28 | * @version : 1.0 29 | * 30 | *
    31 |  * << 개정이력(Modification Information) >>
    32 |  *
    33 |  *   수정일              수정자               수정내용
    34 |  *  -------------  ------------   ---------------------
    35 |  *   2021. 7. 20    윤주호               최초 생성
    36 |  * 
    37 | * 38 | */ 39 | @Configuration 40 | @PropertySources({ 41 | @PropertySource("classpath:/application.properties") 42 | }) 43 | public class EgovConfigAppMapper { 44 | @Autowired 45 | DataSource dataSource; 46 | 47 | @Autowired 48 | Environment env; 49 | 50 | private String dbType; 51 | 52 | @PostConstruct 53 | void init() { 54 | dbType = env.getProperty("Globals.DbType"); 55 | } 56 | 57 | @Bean 58 | @Lazy 59 | public DefaultLobHandler lobHandler() { 60 | return new DefaultLobHandler(); 61 | } 62 | 63 | @Bean(name = {"sqlSession", "egov.sqlSession"}) 64 | public SqlSessionFactoryBean sqlSession() { 65 | SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean(); 66 | sqlSessionFactoryBean.setDataSource(dataSource); 67 | 68 | PathMatchingResourcePatternResolver pathMatchingResourcePatternResolver = new PathMatchingResourcePatternResolver(); 69 | 70 | sqlSessionFactoryBean.setConfigLocation( 71 | pathMatchingResourcePatternResolver 72 | .getResource("classpath:/egovframework/mapper/config/mapper-config.xml")); 73 | 74 | try { 75 | sqlSessionFactoryBean.setMapperLocations( 76 | pathMatchingResourcePatternResolver 77 | .getResources("classpath:/egovframework/mapper/let/**/*_" + dbType + ".xml")); 78 | } catch (IOException e) { 79 | // TODO Exception 처리 필요 80 | } 81 | 82 | return sqlSessionFactoryBean; 83 | } 84 | 85 | @Bean 86 | public SqlSessionTemplate egovSqlSessionTemplate(@Qualifier("sqlSession") SqlSessionFactory sqlSession) { 87 | SqlSessionTemplate sqlSessionTemplate = new SqlSessionTemplate(sqlSession); 88 | return sqlSessionTemplate; 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/config/EgovConfigAppMsg.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.config; 2 | 3 | import egovframework.com.cmm.EgovMessageSource; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | import org.springframework.context.support.ReloadableResourceBundleMessageSource; 7 | 8 | /** 9 | * fileName : EgovConfigAppMsg 10 | * author : crlee 11 | * date : 2023/05/05 12 | * description : 13 | * =========================================================== 14 | * DATE AUTHOR NOTE 15 | * ----------------------------------------------------------- 16 | * 2023/05/05 crlee 최초 생성 17 | */ 18 | @Configuration 19 | public class EgovConfigAppMsg { 20 | 21 | /** 22 | * @return [Resource 설정] 메세지 Properties 경로 설정 23 | */ 24 | @Bean 25 | public ReloadableResourceBundleMessageSource messageSource() { 26 | ReloadableResourceBundleMessageSource reloadableResourceBundleMessageSource = new ReloadableResourceBundleMessageSource(); 27 | 28 | reloadableResourceBundleMessageSource.setBasenames( 29 | "classpath:/egovframework/message/com/message-common", 30 | "classpath:/org/egovframe/rte/fdl/idgnr/messages/idgnr", 31 | "classpath:/org/egovframe/rte/fdl/property/messages/properties"); 32 | reloadableResourceBundleMessageSource.setCacheSeconds(60); 33 | return reloadableResourceBundleMessageSource; 34 | } 35 | 36 | /** 37 | * @return [Resource 설정] 메세지 소스 등록 38 | */ 39 | @Bean 40 | public EgovMessageSource egovMessageSource() { 41 | EgovMessageSource egovMessageSource = new EgovMessageSource(); 42 | egovMessageSource.setReloadableResourceBundleMessageSource(messageSource()); 43 | return egovMessageSource; 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/config/EgovConfigAppProperties.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.config; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | import org.springframework.beans.factory.annotation.Value; 7 | import org.springframework.context.annotation.Bean; 8 | import org.springframework.context.annotation.Configuration; 9 | 10 | import org.egovframe.rte.fdl.property.impl.EgovPropertyServiceImpl; 11 | 12 | /** 13 | * @ClassName : EgovConfigAppProperties.java 14 | * @Description : Properties 설정 15 | * 16 | * @author : 윤주호 17 | * @since : 2021. 7. 20 18 | * @version : 1.0 19 | * 20 | *
    21 |  * << 개정이력(Modification Information) >>
    22 |  *
    23 |  *   수정일              수정자               수정내용
    24 |  *  -------------  ------------   ---------------------
    25 |  *   2021. 7. 20    윤주호               최초 생성
    26 |  * 
    27 | * 28 | */ 29 | 30 | @Configuration 31 | public class EgovConfigAppProperties { 32 | 33 | @Value("${Globals.fileStorePath}") 34 | private String fileStorePath; 35 | 36 | @Value("${Globals.addedOptions}") 37 | private String addedOptions; 38 | 39 | @Value("${Globals.pageUnit}") 40 | private String pageUnit; 41 | @Value("${Globals.pageSize}") 42 | private String pageSize; 43 | @Value("${Globals.posblAtchFileSize}") 44 | private String posblAtchFileSize; 45 | 46 | 47 | @Bean(destroyMethod = "destroy") 48 | public EgovPropertyServiceImpl propertiesService() { 49 | EgovPropertyServiceImpl egovPropertyServiceImpl = new EgovPropertyServiceImpl(); 50 | 51 | Map properties = new HashMap(); 52 | properties.put("Globals.pageUnit", pageUnit); 53 | properties.put("Globals.pageSize", pageSize); 54 | properties.put("Globals.posblAtchFileSize", posblAtchFileSize); 55 | properties.put("Globals.fileStorePath", fileStorePath); 56 | properties.put("Globals.addedOptions", addedOptions); 57 | 58 | egovPropertyServiceImpl.setProperties(properties); 59 | return egovPropertyServiceImpl; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/config/EgovConfigAppValidator.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.config; 2 | 3 | import java.io.IOException; 4 | import java.util.ArrayList; 5 | import java.util.Arrays; 6 | import java.util.List; 7 | 8 | import org.springframework.context.annotation.Bean; 9 | import org.springframework.context.annotation.Configuration; 10 | import org.springframework.core.io.Resource; 11 | import org.springframework.core.io.support.PathMatchingResourcePatternResolver; 12 | import org.springmodules.validation.commons.DefaultBeanValidator; 13 | import org.springmodules.validation.commons.DefaultValidatorFactory; 14 | 15 | /** 16 | * @ClassName : EgovConfigAppValidator.java 17 | * @Description : Validator 설정 18 | * 19 | * @author : 윤주호 20 | * @since : 2021. 7. 20 21 | * @version : 1.0 22 | * 23 | *
    24 |  * << 개정이력(Modification Information) >>
    25 |  *
    26 |  *   수정일              수정자               수정내용
    27 |  *  -------------  ------------   ---------------------
    28 |  *   2021. 7. 20    윤주호               최초 생성
    29 |  * 
    30 | * 31 | */ 32 | @Configuration 33 | public class EgovConfigAppValidator { 34 | 35 | @Bean 36 | public DefaultBeanValidator beanValidator() { 37 | DefaultBeanValidator defaultBeanValidator = new DefaultBeanValidator(); 38 | defaultBeanValidator.setValidatorFactory(validatorFactory()); 39 | return defaultBeanValidator; 40 | 41 | } 42 | 43 | /** validation config location 설정 44 | * @return 45 | */ 46 | @Bean 47 | public DefaultValidatorFactory validatorFactory() { 48 | DefaultValidatorFactory defaultValidatorFactory = new DefaultValidatorFactory(); 49 | 50 | defaultValidatorFactory.setValidationConfigLocations(getValidationConfigLocations()); 51 | 52 | return defaultValidatorFactory; 53 | } 54 | 55 | private Resource[] getValidationConfigLocations() { 56 | 57 | PathMatchingResourcePatternResolver pathMatchingResourcePatternResolver = new PathMatchingResourcePatternResolver(); 58 | 59 | List validationConfigLocations = new ArrayList(); 60 | 61 | Resource[] validationRulesConfigLocations = new Resource[] { 62 | pathMatchingResourcePatternResolver 63 | .getResource("classpath:/egovframework/validator/validator-rules-let.xml") 64 | }; 65 | 66 | Resource[] validationFormSetLocations = new Resource[] {}; 67 | try { 68 | validationFormSetLocations = pathMatchingResourcePatternResolver 69 | .getResources("classpath:/egovframework/validator/let/**/*.xml"); 70 | } catch (IOException e) { 71 | // TODO Exception 처리 필요 72 | } 73 | 74 | validationConfigLocations.addAll(Arrays.asList(validationRulesConfigLocations)); 75 | validationConfigLocations.addAll(Arrays.asList(validationFormSetLocations)); 76 | 77 | return validationConfigLocations.toArray(new Resource[validationConfigLocations.size()]); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/config/EgovConfigAppWhitelist.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.config; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import org.springframework.context.annotation.Bean; 7 | import org.springframework.context.annotation.Configuration; 8 | 9 | /** 10 | * @ClassName : EgovConfigAppWhitelist.java 11 | * @Description : whiteList 설정 12 | * 13 | * @author : 윤주호 14 | * @since : 2021. 7. 20 15 | * @version : 1.0 16 | * 17 | *
    18 |  * << 개정이력(Modification Information) >>
    19 |  *
    20 |  *   수정일              수정자               수정내용
    21 |  *  -------------  ------------   ---------------------
    22 |  *   2021. 7. 20    윤주호               최초 생성
    23 |  * 
    24 | * 25 | */ 26 | @Configuration 27 | public class EgovConfigAppWhitelist { 28 | 29 | @Bean 30 | public List egovPageLinkWhitelist() { 31 | List whiteList = new ArrayList(); 32 | whiteList.add("main/inc/EgovIncHeader"); 33 | whiteList.add("main/inc/EgovIncTopnav"); 34 | whiteList.add("main/inc/EgovIncLeftmenu"); 35 | whiteList.add("main/inc/EgovIncFooter"); 36 | whiteList.add("main/sample_menu/Intro"); 37 | whiteList.add("main/sample_menu/EgovDownloadDetail"); 38 | whiteList.add("main/sample_menu/EgovDownloadModify"); 39 | whiteList.add("main/sample_menu/EgovQADetail"); 40 | whiteList.add("main/sample_menu/EgovAboutSite"); 41 | whiteList.add("main/sample_menu/EgovHistory"); 42 | whiteList.add("main/sample_menu/EgovOrganization"); 43 | whiteList.add("main/sample_menu/EgovLocation"); 44 | whiteList.add("main/sample_menu/EgovProductInfo"); 45 | whiteList.add("main/sample_menu/EgovServiceInfo"); 46 | whiteList.add("main/sample_menu/EgovDownload"); 47 | whiteList.add("main/sample_menu/EgovQA"); 48 | whiteList.add("main/sample_menu/EgovService"); 49 | return whiteList; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/config/EgovConfigWebDispatcherServlet.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.config; 2 | 3 | import org.springframework.context.annotation.ComponentScan; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.context.annotation.FilterType; 6 | import org.springframework.stereotype.Repository; 7 | import org.springframework.stereotype.Service; 8 | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; 9 | import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; 10 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 11 | 12 | import egovframework.com.cmm.interceptor.AuthenticInterceptor; 13 | import egovframework.com.cmm.interceptor.CustomAuthenticInterceptor; 14 | 15 | /** 16 | * @ClassName : EgovConfigWebDispatcherServlet.java 17 | * @Description : DispatcherServlet 설정 18 | * 19 | * @author : 윤주호 20 | * @since : 2021. 7. 20 21 | * @version : 1.0 22 | * 23 | *
    24 |  * << 개정이력(Modification Information) >>
    25 |  *
    26 |  *   수정일              수정자               수정내용
    27 |  *  -------------  ------------   ---------------------
    28 |  *   2021. 7. 20    윤주호               최초 생성
    29 |  * 
    30 | * 31 | */ 32 | @Configuration 33 | @ComponentScan(basePackages = "egovframework", excludeFilters = { 34 | @ComponentScan.Filter(type = FilterType.ANNOTATION, value = Service.class), 35 | @ComponentScan.Filter(type = FilterType.ANNOTATION, value = Repository.class), 36 | @ComponentScan.Filter(type = FilterType.ANNOTATION, value = Configuration.class) 37 | }) 38 | public class EgovConfigWebDispatcherServlet implements WebMvcConfigurer { 39 | 40 | // ===================================================================== 41 | // RequestMappingHandlerMapping 설정 42 | // ===================================================================== 43 | // ------------------------------------------------------------- 44 | // RequestMappingHandlerMapping 설정 - Interceptor 추가 45 | // ------------------------------------------------------------- 46 | @Override 47 | public void addInterceptors(InterceptorRegistry registry) { 48 | registry.addInterceptor(new AuthenticInterceptor()) 49 | .addPathPatterns( 50 | "/auth/*") 51 | .excludePathPatterns( 52 | "/auth/login", 53 | "/auth/login-jwt", 54 | "/auth/logout" 55 | ); 56 | registry.addInterceptor(new CustomAuthenticInterceptor()) 57 | .addPathPatterns( 58 | "/**/*.do") 59 | .excludePathPatterns( 60 | "/auth/**"); 61 | } 62 | 63 | // ------------------------------------------------------------- 64 | // RequestMappingHandlerMapping 설정 View Controller 추가 65 | // ------------------------------------------------------------- 66 | @Override 67 | public void addViewControllers(ViewControllerRegistry registry) { 68 | registry.addViewController("/cmmn/validator.do") 69 | .setViewName("cmmn/validator"); 70 | registry.addViewController("/").setViewName("forward:/index.html"); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/config/EgovWebServletContextListener.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.config; 2 | 3 | import javax.servlet.ServletContextEvent; 4 | import javax.servlet.ServletContextListener; 5 | 6 | import egovframework.com.cmm.service.EgovProperties; 7 | import lombok.extern.slf4j.Slf4j; 8 | 9 | @Slf4j 10 | public class EgovWebServletContextListener implements ServletContextListener { 11 | 12 | public EgovWebServletContextListener() { 13 | setEgovProfileSetting(); 14 | } 15 | 16 | @Override 17 | public void contextInitialized(ServletContextEvent event) { 18 | if (System.getProperty("spring.profiles.active") == null) { 19 | setEgovProfileSetting(); 20 | } 21 | } 22 | 23 | @Override 24 | public void contextDestroyed(ServletContextEvent event) { 25 | if (System.getProperty("spring.profiles.active") != null) { 26 | System.clearProperty("spring.profiles.active"); 27 | } 28 | } 29 | 30 | public void setEgovProfileSetting() { 31 | try { 32 | log.debug("===========================Start EgovServletContextLoad START ==========="); 33 | System.setProperty("spring.profiles.active", 34 | EgovProperties.getProperty("Globals.DbType") + "," + EgovProperties.getProperty("Globals.Auth")); 35 | log.debug("Setting spring.profiles.active>" + System.getProperty("spring.profiles.active")); 36 | log.debug("===========================END EgovServletContextLoad END ==========="); 37 | } catch (IllegalArgumentException e) { 38 | log.error("[IllegalArgumentException] Try/Catch...usingParameters Runing : " + e.getMessage()); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/config/HtmlCharacterEscapes.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.config; 2 | 3 | import org.apache.commons.text.StringEscapeUtils; 4 | 5 | import com.fasterxml.jackson.core.SerializableString; 6 | import com.fasterxml.jackson.core.io.CharacterEscapes; 7 | import com.fasterxml.jackson.core.io.SerializedString; 8 | 9 | public class HtmlCharacterEscapes extends CharacterEscapes { 10 | 11 | private static final long serialVersionUID = -6353236148390563705L; 12 | 13 | private final int[] asciiEscapes; 14 | 15 | public HtmlCharacterEscapes() { 16 | this.asciiEscapes = CharacterEscapes.standardAsciiEscapesForJSON(); 17 | this.asciiEscapes['<'] = CharacterEscapes.ESCAPE_CUSTOM; 18 | this.asciiEscapes['>'] = CharacterEscapes.ESCAPE_CUSTOM; 19 | this.asciiEscapes['\"'] = CharacterEscapes.ESCAPE_CUSTOM; 20 | this.asciiEscapes['('] = CharacterEscapes.ESCAPE_CUSTOM; 21 | this.asciiEscapes[')'] = CharacterEscapes.ESCAPE_CUSTOM; 22 | this.asciiEscapes['#'] = CharacterEscapes.ESCAPE_CUSTOM; 23 | this.asciiEscapes['\''] = CharacterEscapes.ESCAPE_CUSTOM; 24 | } 25 | 26 | @Override 27 | public int[] getEscapeCodesForAscii() { 28 | return asciiEscapes; 29 | } 30 | 31 | @Override 32 | public SerializableString getEscapeSequence(int ch) { 33 | return new SerializedString(StringEscapeUtils.escapeHtml4(Character.toString((char) ch))); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/config/OpenApiConfig.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.config; 2 | 3 | import java.util.Map; 4 | 5 | import org.springframework.context.annotation.Bean; 6 | import org.springframework.context.annotation.Configuration; 7 | 8 | import io.swagger.v3.oas.models.Components; 9 | import io.swagger.v3.oas.models.ExternalDocumentation; 10 | import io.swagger.v3.oas.models.OpenAPI; 11 | import io.swagger.v3.oas.models.info.Contact; 12 | import io.swagger.v3.oas.models.info.Info; 13 | import io.swagger.v3.oas.models.info.License; 14 | import io.swagger.v3.oas.models.media.Schema; 15 | import io.swagger.v3.oas.models.media.StringSchema; 16 | import io.swagger.v3.oas.models.security.SecurityScheme; 17 | 18 | @Configuration 19 | public class OpenApiConfig { 20 | 21 | private static final String API_NAME = "Simple Homepage Project API"; 22 | private static final String API_VERSION = "4.3.0"; 23 | private static final String API_DESCRIPTION = "심플홈페이지 프로젝트 명세서"; 24 | 25 | @Bean 26 | public OpenAPI api() { 27 | 28 | Schema fileMap = new Schema>() 29 | .addProperty("atchFileId", new StringSchema().example("")) 30 | .addProperty("fileSn", new StringSchema().example("0")); 31 | 32 | Schema passwordMap = new Schema>() 33 | .addProperty("old_password", new StringSchema().example("")) 34 | .addProperty("new_password", new StringSchema().example("")); 35 | 36 | return new OpenAPI() 37 | .info(new Info().title(API_NAME) 38 | .description(API_DESCRIPTION) 39 | .version(API_VERSION) 40 | .contact(new Contact().name("eGovFrame").url("https://www.egovframe.go.kr/").email("egovframesupport@gmail.com")) 41 | .license(new License().name("Apache 2.0").url("https://www.apache.org/licenses/LICENSE-2.0"))) 42 | .components(new Components() 43 | .addSecuritySchemes("Authorization", new SecurityScheme() 44 | .name("Authorization") 45 | .type(SecurityScheme.Type.APIKEY) 46 | .in(SecurityScheme.In.HEADER)) 47 | .addSchemas("fileMap", fileMap) 48 | .addSchemas("passwordMap", passwordMap)) 49 | .externalDocs(new ExternalDocumentation() 50 | .description("Wiki Documentation") 51 | .url("https://github.com/eGovFramework/egovframe-template-simple-backend/wiki")); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/jwt/InvalidJwtException.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.jwt; 2 | 3 | public class InvalidJwtException extends RuntimeException { 4 | public InvalidJwtException(String message, Throwable cause) { 5 | super(message, cause); 6 | } 7 | 8 | public InvalidJwtException(String message) { 9 | super(message); 10 | } 11 | } 12 | 13 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/jwt/JwtAuthenticationEntryPoint.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.jwt; 2 | 3 | import java.io.IOException; 4 | 5 | import javax.servlet.http.HttpServletRequest; 6 | import javax.servlet.http.HttpServletResponse; 7 | 8 | import org.springframework.http.HttpStatus; 9 | import org.springframework.http.MediaType; 10 | import org.springframework.security.core.AuthenticationException; 11 | import org.springframework.security.web.AuthenticationEntryPoint; 12 | import org.springframework.stereotype.Component; 13 | 14 | import com.fasterxml.jackson.databind.ObjectMapper; 15 | 16 | import egovframework.com.cmm.ResponseCode; 17 | import egovframework.com.cmm.service.ResultVO; 18 | 19 | /** 20 | * fileName : JwtAuthenticationEntryPoint 21 | * author : crlee 22 | * date : 2023/06/11 23 | * description : 24 | * =========================================================== 25 | * DATE AUTHOR NOTE 26 | * ----------------------------------------------------------- 27 | * 2023/06/11 crlee 최초 생성 28 | */ 29 | 30 | @Component 31 | public class JwtAuthenticationEntryPoint implements AuthenticationEntryPoint { 32 | 33 | 34 | @Override 35 | public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException { 36 | 37 | ResultVO resultVO = new ResultVO(); 38 | resultVO.setResultCode(ResponseCode.AUTH_ERROR.getCode()); 39 | resultVO.setResultMessage(ResponseCode.AUTH_ERROR.getMessage()); 40 | ObjectMapper mapper = new ObjectMapper(); 41 | 42 | //Convert object to JSON string 43 | String jsonInString = mapper.writeValueAsString(resultVO); 44 | 45 | 46 | 47 | response.setStatus(HttpStatus.UNAUTHORIZED.value()); 48 | response.setContentType(MediaType.APPLICATION_JSON.toString()); 49 | response.setCharacterEncoding("UTF-8"); 50 | response.getWriter().println(jsonInString); 51 | 52 | } 53 | } -------------------------------------------------------------------------------- /src/main/java/egovframework/com/security/CustomAuthenticationPrincipalResolver.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.security; 2 | 3 | import egovframework.com.cmm.LoginVO; 4 | import org.springframework.core.MethodParameter; 5 | import org.springframework.security.core.Authentication; 6 | import org.springframework.security.core.annotation.AuthenticationPrincipal; 7 | import org.springframework.security.core.context.SecurityContextHolder; 8 | import org.springframework.web.bind.support.WebDataBinderFactory; 9 | import org.springframework.web.context.request.NativeWebRequest; 10 | import org.springframework.web.method.support.HandlerMethodArgumentResolver; 11 | import org.springframework.web.method.support.ModelAndViewContainer; 12 | 13 | /** 14 | * fileName : CustomAuthenticationPrincipalResolver 15 | * author : crlee 16 | * date : 2023/07/13 17 | * description : 18 | * =========================================================== 19 | * DATE AUTHOR NOTE 20 | * ----------------------------------------------------------- 21 | * 2023/07/13 crlee 최초 생성 22 | */ 23 | public class CustomAuthenticationPrincipalResolver implements HandlerMethodArgumentResolver { 24 | 25 | @Override 26 | public boolean supportsParameter(MethodParameter parameter) { 27 | return parameter.hasParameterAnnotation(AuthenticationPrincipal.class) && 28 | parameter.getParameterType().equals(LoginVO.class); 29 | } 30 | 31 | @Override 32 | public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer, 33 | NativeWebRequest webRequest, WebDataBinderFactory binderFactory) throws Exception { 34 | 35 | Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); 36 | if (authentication == null || 37 | authentication.getPrincipal() == null || 38 | "anonymousUser".equals(authentication.getPrincipal()) 39 | ) { 40 | return new LoginVO(); 41 | } 42 | 43 | return authentication.getPrincipal(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/egovframework/com/security/WebMvcConfig.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.security; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.http.converter.HttpMessageConverter; 6 | import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; 7 | import org.springframework.web.method.support.HandlerMethodArgumentResolver; 8 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 9 | 10 | import com.fasterxml.jackson.databind.ObjectMapper; 11 | 12 | import egovframework.com.config.HtmlCharacterEscapes; 13 | import lombok.RequiredArgsConstructor; 14 | 15 | import java.util.List; 16 | 17 | /** 18 | * fileName : WebMvcConfig 19 | * author : crlee 20 | * date : 2023/07/13 21 | * description : 22 | * =========================================================== 23 | * DATE AUTHOR NOTE 24 | * ----------------------------------------------------------- 25 | * 2023/07/13 crlee 최초 생성 26 | */ 27 | @Configuration 28 | @RequiredArgsConstructor 29 | public class WebMvcConfig implements WebMvcConfigurer { 30 | 31 | private final ObjectMapper objectMapper; 32 | 33 | @Override 34 | public void addArgumentResolvers(List argumentResolvers) { 35 | argumentResolvers.add(new CustomAuthenticationPrincipalResolver()); 36 | } 37 | 38 | @Bean 39 | public HttpMessageConverter htmlEscapingConverter() { 40 | ObjectMapper copy = objectMapper.copy(); 41 | copy.getFactory().setCharacterEscapes(new HtmlCharacterEscapes()); 42 | return new MappingJackson2HttpMessageConverter(copy); 43 | } 44 | 45 | } -------------------------------------------------------------------------------- /src/main/java/egovframework/com/sns/SnsUtils.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.sns; 2 | 3 | import java.io.BufferedReader; 4 | import java.io.IOException; 5 | import java.io.InputStream; 6 | import java.io.InputStreamReader; 7 | import java.net.HttpURLConnection; 8 | import java.net.MalformedURLException; 9 | import java.net.URL; 10 | import java.util.Map; 11 | 12 | /** 13 | * Sns 로그인을 처리하는 공통 메서드 클래스 14 | * @version 1.0 15 | * 16 | *
    17 |  * << 개정이력(Modification Information) >>
    18 |  *
    19 |  *  수정일      수정자      수정내용
    20 |  *  -------            --------        ---------------------------
    21 |  *  2024.08.15  김일국     최초 생성
    22 |  *
    23 |  *  
    24 | */ 25 | public class SnsUtils { 26 | 27 | //Open Api 데이터 가져오기(공통) 28 | public static String getOpenApi(String openApiUrl, Map requestHeaders){ 29 | HttpURLConnection con = connect(openApiUrl); 30 | try { 31 | for(Map.Entry header :requestHeaders.entrySet()) { 32 | con.setRequestProperty(header.getKey(), header.getValue()); 33 | } 34 | int responseCode = con.getResponseCode(); 35 | if (responseCode == HttpURLConnection.HTTP_OK) { // 정상 호출 36 | return readBody(con.getInputStream()); 37 | } else { // 에러 발생 38 | return readBody(con.getErrorStream()); 39 | } 40 | } catch (IOException e) { 41 | throw new RuntimeException("API 요청과 응답 실패", e); 42 | } finally { 43 | con.disconnect(); 44 | } 45 | } 46 | 47 | //외부 URL 커넥션 호출(공통) 48 | private static HttpURLConnection connect(String apiUrl){ 49 | try { 50 | URL url = new URL(apiUrl); 51 | return (HttpURLConnection)url.openConnection(); 52 | } catch (MalformedURLException e) { 53 | throw new RuntimeException("API URL이 잘못되었습니다. : " + apiUrl, e); 54 | } catch (IOException e) { 55 | throw new RuntimeException("연결이 실패했습니다. : " + apiUrl, e); 56 | } 57 | } 58 | //외부 프로필 내용 출력(공통) 59 | private static String readBody(InputStream body){ 60 | InputStreamReader streamReader = new InputStreamReader(body); 61 | try (BufferedReader lineReader = new BufferedReader(streamReader)) { 62 | StringBuilder responseBody = new StringBuilder(); 63 | String line; 64 | while ((line = lineReader.readLine()) != null) { 65 | responseBody.append(line); 66 | } 67 | return responseBody.toString(); 68 | } catch (IOException e) { 69 | throw new RuntimeException("API 응답을 읽는데 실패했습니다.", e); 70 | } 71 | } 72 | } -------------------------------------------------------------------------------- /src/main/java/egovframework/com/sns/SnsVO.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.sns; 2 | 3 | import lombok.Getter; 4 | 5 | class SnsVO { 6 | /** 7 | * 네이버용 토큰, 응답, 프로필 변수 VO 시작 8 | */ 9 | @Getter 10 | static class NaverTokenVO { 11 | private String access_token; 12 | private String refresh_token; 13 | private String token_type; 14 | private String expires_in; 15 | private String error; 16 | private String error_description; 17 | } 18 | @Getter 19 | static class NaverResponseVO { 20 | private String resultcode; 21 | private String message; 22 | private Object response; 23 | } 24 | @Getter 25 | static class NaverProfileVO { 26 | private String id; 27 | private String email; 28 | private String name; 29 | } 30 | /** 31 | * 카카오용 토큰, 응답, 프로필 변수 VO 끝 32 | */ 33 | @Getter 34 | static class KakaoTokenVO { 35 | private String access_token; 36 | private String refresh_token; 37 | private String token_type; 38 | private String expires_in; 39 | private String scope; 40 | private String refresh_token_expires_in; 41 | private String error; 42 | private String error_description; 43 | private String error_code; 44 | } 45 | @Getter 46 | static class KakaoResponseVO { 47 | private String id; 48 | private String connected_at; 49 | private Object properties; 50 | private Object kakao_account; 51 | private String msg; 52 | private int code; 53 | } 54 | @Getter 55 | static class KakaoProfileVO { 56 | private String id; 57 | private String nickname; 58 | } 59 | } -------------------------------------------------------------------------------- /src/main/java/egovframework/let/cop/bbs/domain/model/Board.java: -------------------------------------------------------------------------------- 1 | package egovframework.let.cop.bbs.domain.model; 2 | 3 | import java.io.Serializable; 4 | 5 | import lombok.Getter; 6 | import lombok.Setter; 7 | import org.apache.commons.lang3.builder.ToStringBuilder; 8 | 9 | import io.swagger.v3.oas.annotations.media.Schema; 10 | 11 | /** 12 | * 게시물에 대한 데이터 처리 모델 클래스 13 | * @author 공통 서비스 개발팀 이삼섭 14 | * @since 2009.03.06 15 | * @version 1.0 16 | * @see 17 | * 18 | *
     19 |  * << 개정이력(Modification Information) >>
     20 |  *
     21 |  *   수정일      수정자          수정내용
     22 |  *  -------    --------    ---------------------------
     23 |  *  2009.03.06  이삼섭          최초 생성
     24 |  *  2011.08.31  JJY            경량환경 템플릿 커스터마이징버전 생성
     25 |  *
     26 |  *  
    27 | */ 28 | @Schema(description = "게시물 모델") 29 | @Getter 30 | @Setter 31 | public class Board implements Serializable { 32 | 33 | /** 34 | * serialVersion UID 35 | */ 36 | private static final long serialVersionUID = -8868310931851410226L; 37 | 38 | @Schema(description = "게시물 첨부파일 아이디") 39 | private String atchFileId = ""; 40 | 41 | @Schema(description = "게시판 아이디") 42 | private String bbsId = ""; 43 | 44 | @Schema(description = "최초등록자 아이디") 45 | private String frstRegisterId = ""; 46 | 47 | @Schema(description = "최초등록시점") 48 | private String frstRegisterPnttm = ""; 49 | 50 | @Schema(description = "최종수정자 아이디") 51 | private String lastUpdusrId = ""; 52 | 53 | @Schema(description = "최종수정시점") 54 | private String lastUpdusrPnttm = ""; 55 | 56 | @Schema(description = "게시시작일") 57 | private String ntceBgnde = ""; 58 | 59 | @Schema(description = "게시종료일") 60 | private String ntceEndde = ""; 61 | 62 | @Schema(description = "게시자 아이디") 63 | private String ntcrId = ""; 64 | 65 | @Schema(description = "게시자명") 66 | private String ntcrNm = ""; 67 | 68 | @Schema(description = "게시물 내용") 69 | private String nttCn = ""; 70 | 71 | @Schema(description = "게시물 아이디") 72 | private long nttId = 0L; 73 | 74 | @Schema(description = "게시물 번호") 75 | private long nttNo = 0L; 76 | 77 | @Schema(description = "게시물 제목") 78 | private String nttSj = ""; 79 | 80 | @Schema(description = "부모글번호") 81 | private String parnts = "0"; 82 | 83 | @Schema(description = "패스워드") 84 | private String password = ""; 85 | 86 | @Schema(description = "조회수") 87 | private int inqireCo = 0; 88 | 89 | @Schema(description = "답장여부") 90 | private String replyAt = ""; 91 | 92 | @Schema(description = "답장위치") 93 | private String replyLc = "0"; 94 | 95 | @Schema(description = "정렬순서(DESC,ASC)") 96 | private long sortOrdr = 0L; 97 | 98 | @Schema(description = "사용여부", allowableValues = {"Y", "N"}) 99 | private String useAt = ""; 100 | 101 | @Schema(description = "게시 종료일") 102 | private String ntceEnddeView = ""; 103 | 104 | @Schema(description = "게시 시작일") 105 | private String ntceBgndeView = ""; 106 | 107 | /** 108 | * toString 메소드를 대치한다. 109 | */ 110 | public String toString(){ 111 | return ToStringBuilder.reflectionToString(this); 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /src/main/java/egovframework/let/cop/bbs/domain/model/BoardMasterVO.java: -------------------------------------------------------------------------------- 1 | package egovframework.let.cop.bbs.domain.model; 2 | 3 | import java.io.Serializable; 4 | 5 | import org.apache.commons.lang3.builder.ToStringBuilder; 6 | 7 | import io.swagger.v3.oas.annotations.media.Schema; 8 | import lombok.Builder; 9 | import lombok.Getter; 10 | import lombok.Setter; 11 | 12 | /** 13 | * 게시판 속성 정보를 관리하기 위한 VO 클래스 14 | * @author 공통 서비스 개발팀 이삼섭 15 | * @since 2009.03.12 16 | * @version 1.0 17 | * @see 18 | * 19 | *
     20 |  * << 개정이력(Modification Information) >>
     21 |  *
     22 |  *   수정일      수정자          수정내용
     23 |  *  -------    --------    ---------------------------
     24 |  *  2009.03.12  이삼섭          최초 생성
     25 |  *  2011.08.31  JJY            경량환경 템플릿 커스터마이징버전 생성
     26 |  *
     27 |  *  
    28 | */ 29 | @Schema(description = "게시판 속성 정보 VO") 30 | @Getter 31 | @Setter 32 | public class BoardMasterVO extends BoardMaster implements Serializable { 33 | 34 | /** 35 | * serialVersion UID 36 | */ 37 | private static final long serialVersionUID = -8070768280461816170L; 38 | 39 | @Schema(description = "검색시작일", example="") 40 | private String searchBgnDe = ""; 41 | 42 | @Schema(description = "검색조건", example = "0", defaultValue = "0", type = "string") 43 | private String searchCnd = ""; 44 | 45 | @Schema(description = "검색종료일", example="") 46 | private String searchEndDe = ""; 47 | 48 | @Schema(description = "검색단어", example="") 49 | private String searchWrd = ""; 50 | 51 | @Schema(description = "정렬순서(DESC,ASC)", example="") 52 | private String sortOrdr = ""; 53 | 54 | @Schema(description = "검색사용여부", example="") 55 | private String searchUseYn = ""; 56 | 57 | @Schema(description = "현재페이지", example="1") 58 | private int pageIndex = 1; 59 | 60 | @Schema(description = "페이지갯수", example="10") 61 | private int pageUnit = 10; 62 | 63 | @Schema(description = "페이지사이즈", example="10") 64 | private int pageSize = 10; 65 | 66 | @Schema(description = "첫페이지 인덱스", example="1") 67 | private int firstIndex = 1; 68 | 69 | @Schema(description = "마지막페이지 인덱스", example="1") 70 | private int lastIndex = 1; 71 | 72 | @Schema(description = "페이지당 레코드 개수", example="10") 73 | private int recordCountPerPage = 10; 74 | 75 | @Schema(description = "레코드 번호", example="0") 76 | private int rowNo = 0; 77 | 78 | @Schema(description = "최초 등록자명", example="") 79 | private String frstRegisterNm = ""; 80 | 81 | @Schema(description = "게시판유형 코드명", example="") 82 | private String bbsTyCodeNm = ""; 83 | 84 | @Schema(description = "게시판속성 코드명", example="") 85 | private String bbsAttrbCodeNm = ""; 86 | 87 | @Schema(description = "최종 수정자명", example="") 88 | private String lastUpdusrNm = ""; 89 | 90 | @Schema(description = "권한지정 여부", example="") 91 | private String authFlag = ""; 92 | 93 | /** 94 | * toString 메소드를 대치한다. 95 | */ 96 | @Override 97 | public String toString() { 98 | return ToStringBuilder.reflectionToString(this); 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /src/main/java/egovframework/let/cop/bbs/domain/repository/BBSAddedOptionsDAO.java: -------------------------------------------------------------------------------- 1 | package egovframework.let.cop.bbs.domain.repository; 2 | import org.egovframe.rte.psl.dataaccess.EgovAbstractMapper; 3 | import org.springframework.stereotype.Repository; 4 | 5 | import egovframework.let.cop.bbs.domain.model.BoardMaster; 6 | import egovframework.let.cop.bbs.domain.model.BoardMasterVO; 7 | 8 | /** 9 | * 2단계 기능 추가 (댓글관리, 만족도조사) 관리를 위한 데이터 접근 클래스 10 | * @author 공통 서비스 개발팀 한성곤 11 | * @since 2009.06.26 12 | * @version 1.0 13 | * @see 14 | * 15 | *
    16 |  * << 개정이력(Modification Information) >>
    17 |  * 
    18 |  *   수정일      수정자          수정내용
    19 |  *  -------    --------    ---------------------------
    20 |  *  2009.06.26  한성곤          최초 생성
    21 |  *  2011.08.31  JJY            경량환경 템플릿 커스터마이징버전 생성 
    22 |  *  
    23 |  *  
    24 | */ 25 | @Repository("BBSAddedOptionsDAO") 26 | public class BBSAddedOptionsDAO extends EgovAbstractMapper { 27 | 28 | /** 29 | * 신규 게시판 추가기능 정보를 등록한다. 30 | * 31 | * @param BoardMaster 32 | */ 33 | public int insertAddedOptionsInf(BoardMaster boardMaster) throws Exception { 34 | return (int)insert("BBSAddedOptionsDAO.insertAddedOptionsInf", boardMaster); 35 | } 36 | 37 | /** 38 | * 게시판 추가기능 정보 한 건을 상세조회 한다. 39 | * 40 | * @param BoardMasterVO 41 | */ 42 | public BoardMasterVO selectAddedOptionsInf(BoardMaster searchVO) throws Exception { 43 | return (BoardMasterVO)selectOne("BBSAddedOptionsDAO.selectAddedOptionsInf", searchVO); 44 | } 45 | 46 | /** 47 | * 게시판 추가기능 정보를 수정한다. 48 | * 49 | * @param BoardMaster 50 | */ 51 | public void updateAddedOptionsInf(BoardMaster boardMaster) throws Exception { 52 | update("BBSAddedOptionsDAO.updateAddedOptionsInf", boardMaster); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/egovframework/let/cop/bbs/domain/repository/BBSLoneMasterDAO.java: -------------------------------------------------------------------------------- 1 | package egovframework.let.cop.bbs.domain.repository; 2 | import java.util.List; 3 | 4 | import org.egovframe.rte.psl.dataaccess.EgovAbstractMapper; 5 | 6 | import org.springframework.stereotype.Repository; 7 | 8 | import egovframework.let.cop.bbs.domain.model.BoardMaster; 9 | import egovframework.let.cop.bbs.domain.model.BoardMasterVO; 10 | 11 | /** 12 | * 게시판 속성정보 관리를 위한 데이터 접근 클래스 13 | * @author 공통 서비스 개발팀 한성곤 14 | * @since 2009.08.25 15 | * @version 1.0 16 | * @see 17 | * 18 | *
    19 |  * << 개정이력(Modification Information) >>
    20 |  *
    21 |  *   수정일      수정자          수정내용
    22 |  *  -------    --------    ---------------------------
    23 |  *  2009.08.25  한성곤          최초 생성
    24 |  *  2011.08.31  JJY            경량환경 템플릿 커스터마이징버전 생성
    25 |  *
    26 |  *  
    27 | */ 28 | @Repository("BBSLoneMasterDAO") 29 | public class BBSLoneMasterDAO extends EgovAbstractMapper { 30 | 31 | /** 32 | * 등록된 게시판 속성정보를 삭제한다. 33 | * 34 | * @param BoardMaster 35 | */ 36 | public void deleteMaster(BoardMaster boardMaster) throws Exception { 37 | update("BBSLoneMasterDAO.deleteMaster", boardMaster); 38 | } 39 | 40 | /** 41 | * 신규 게시판 속성정보를 등록한다. 42 | * 43 | * @param BoardMaster 44 | */ 45 | public int insertMaster(BoardMaster boardMaster) throws Exception { 46 | return insert("BBSLoneMasterDAO.insertMaster", boardMaster); 47 | } 48 | 49 | /** 50 | * 게시판 속성정보 한 건을 상세조회 한다. 51 | * 52 | * @param BoardMasterVO 53 | */ 54 | public BoardMasterVO selectMaster(BoardMaster vo) throws Exception { 55 | return (BoardMasterVO)selectOne("BBSLoneMasterDAO.selectMaster", vo); 56 | } 57 | 58 | /** 59 | * 게시판 속성정보 목록을 조회한다. 60 | * 61 | * @param BoardMasterVO 62 | */ 63 | public List selectMasterList(BoardMasterVO vo) throws Exception { 64 | return selectList("BBSLoneMasterDAO.selectMasterList", vo); 65 | } 66 | 67 | /** 68 | * 게시판 속성정보 목록 숫자를 조회한다 69 | * 70 | * @param vo 71 | * @return 72 | * @throws Exception 73 | */ 74 | public int selectMasterListCnt(BoardMasterVO vo) throws Exception { 75 | return (Integer)selectOne("BBSLoneMasterDAO.selectMasterListCnt", vo); 76 | } 77 | 78 | /** 79 | * 게시판 속성정보를 수정한다. 80 | * 81 | * @param BoardMaster 82 | */ 83 | public void updateMaster(BoardMaster boardMaster) throws Exception { 84 | update("BBSLoneMasterDAO.updateMaster", boardMaster); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /src/main/java/egovframework/let/cop/bbs/dto/request/BbsSearchRequestDTO.java: -------------------------------------------------------------------------------- 1 | package egovframework.let.cop.bbs.dto.request; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | import lombok.Getter; 5 | import lombok.Setter; 6 | 7 | /** 8 | * 게시판 검색 조건을 담는 VO 클래스 9 | * 게시판 목록 조회 시 사용되는 검색 파라미터들을 구조화하여 전달하기 위한 데이터 객체입니다. 10 | * 11 | * - Swagger 문서화 및 파라미터 자동 바인딩 용도로 사용됩니다. 12 | * - ModelAttribute 또는 RequestParam 변환 시 검색 조건 처리에 활용됩니다. 13 | * 14 | * @author 김재섭(nirsa) 15 | * @since 2025.04.06 16 | * @version 1.0 17 | * @see 18 | * 19 | *
    20 |  * << 개정이력(Modification Information) >>
    21 |  *   
    22 |  *   수정일          수정자         수정내용
    23 |  *   ----------    ------------     -------------------
    24 |  *   2025.04.06    김재섭(nirsa)      최초 생성 
    25 |  *
    26 |  * 
    27 | */ 28 | 29 | @Getter 30 | @Setter 31 | @Schema(description = "게시판 검색 조건") 32 | public class BbsSearchRequestDTO { 33 | 34 | @Schema(description = "게시판 Id", example = "") 35 | private String bbsId = ""; 36 | 37 | @Schema(description = "페이지 번호", example = "1") 38 | private int pageIndex = 1; 39 | 40 | @Schema(description = "검색 조건", example = "0") 41 | private String searchCnd = "0"; 42 | 43 | @Schema(description = "검색어", example = "") 44 | private String searchWrd = ""; 45 | } -------------------------------------------------------------------------------- /src/main/java/egovframework/let/cop/bbs/dto/response/BbsDetailResponseDTO.java: -------------------------------------------------------------------------------- 1 | package egovframework.let.cop.bbs.dto.response; 2 | 3 | import egovframework.let.cop.bbs.domain.model.BoardMasterVO; 4 | import io.swagger.v3.oas.annotations.media.Schema; 5 | import lombok.Builder; 6 | import lombok.Getter; 7 | import lombok.ToString; 8 | 9 | 10 | /** 11 | * 게시글 정보를 반환하는 응답 DTO 클래스 입니다. 12 | * 13 | * @author 김재섭(nirsa) 14 | * @since 2025.04.10 15 | * @version 1.0 16 | * @see 17 | * 18 | *
    19 |  * << 개정이력(Modification Information) >>
    20 |  *   
    21 |  *   수정일          수정자         수정내용
    22 |  *   ----------    ------------     -------------------
    23 |  *   2025.04.10    김재섭(nirsa)      최초 생성 
    24 |  *
    25 |  * 
    26 | */ 27 | 28 | @Getter 29 | @Builder 30 | @ToString 31 | @Schema(description = "게시판 정보 응답 DTO") 32 | public class BbsDetailResponseDTO { 33 | @Schema(description = "게시판 ID", example = "BBSMSTR_AAAAAAAAAAAA") 34 | private String bbsId; 35 | 36 | @Schema(description = "게시판 이름", example = "공지사항") 37 | private String bbsNm; 38 | 39 | @Schema(description = "게시판 유형 코드", example = "BBST01") 40 | private String bbsTyCode; 41 | 42 | @Schema(description = "게시판 유형 이름", example = "공지게시판") 43 | private String bbsTyCodeNm; 44 | 45 | @Schema(description = "게시판 속성 코드", example = "BBSA03") 46 | private String bbsAttrbCode; 47 | 48 | @Schema(description = "게시판 속성 이름", example = "일반게시판") 49 | private String bbsAttrbCodeNm; 50 | 51 | @Schema(description = "첨부파일 허용 개수", example = "3") 52 | private int posblAtchFileNumber; 53 | 54 | @Schema(description = "템플릿 ID", example = "TMPLAT_BOARD_DEFAULT") 55 | private String tmplatId; 56 | 57 | @Schema(description = "사용 여부", example = "Y") 58 | private String useAt; 59 | 60 | @Schema(description = "등록일", example = "2011-08-31") 61 | private String frstRegisterPnttm; 62 | 63 | @Builder.Default 64 | @Schema(description = "추가 option (댓글-comment, 만족도조사-stsfdg)", example="") 65 | private String option = ""; 66 | 67 | /** 68 | * BoardMasterVO → BoardMasterResponse 변환 메서드 입니다. 69 | * @param vo 70 | * @return BoardMasterResponse 71 | */ 72 | public static BbsDetailResponseDTO from(BoardMasterVO vo) { 73 | return BbsDetailResponseDTO.builder() 74 | .bbsId(vo.getBbsId()) 75 | .bbsNm(vo.getBbsNm()) 76 | .bbsTyCode(vo.getBbsTyCode()) 77 | .bbsTyCodeNm(vo.getBbsTyCodeNm()) 78 | .bbsAttrbCode(vo.getBbsAttrbCode()) 79 | .bbsAttrbCodeNm(vo.getBbsAttrbCodeNm()) 80 | .posblAtchFileNumber(vo.getPosblAtchFileNumber()) 81 | .tmplatId(vo.getTmplatId()) 82 | .useAt(vo.getUseAt()) 83 | .frstRegisterPnttm(vo.getFrstRegisterPnttm()) 84 | .option(vo.getOption()) 85 | .build(); 86 | } 87 | } -------------------------------------------------------------------------------- /src/main/java/egovframework/let/cop/bbs/dto/response/BbsInsertResponseDTO.java: -------------------------------------------------------------------------------- 1 | package egovframework.let.cop.bbs.dto.response; 2 | 3 | import java.util.List; 4 | 5 | import com.fasterxml.jackson.annotation.JsonInclude; 6 | 7 | import egovframework.com.cmm.service.CmmnDetailCode; 8 | import io.swagger.v3.oas.annotations.media.Schema; 9 | import lombok.Getter; 10 | import lombok.NoArgsConstructor; 11 | import lombok.Setter; 12 | 13 | /** 14 | * 게시판 마스터 등록을 반환하는 응답 DTO 클래스 입니다. 15 | * 16 | * @author 김재섭(nirsa) 17 | * @since 2025.05.26 18 | * @version 1.0 19 | * @see 20 | * 21 | *
    22 |  * << 개정이력(Modification Information) >>
    23 |  *   
    24 |  *   수정일          수정자         수정내용
    25 |  *   ----------    ------------     -------------------
    26 |  *   2025.05.26    김재섭(nirsa)      최초 생성 
    27 |  *
    28 |  * 
    29 | */ 30 | 31 | @Getter 32 | @Setter 33 | @NoArgsConstructor 34 | @Schema(description = "게시판 마스터 등록 응답 DTO") 35 | public class BbsInsertResponseDTO { 36 | @JsonInclude(JsonInclude.Include.NON_NULL) 37 | @Schema(description = "게시판 타입 리스트", example = "") 38 | private List typeList; 39 | 40 | @JsonInclude(JsonInclude.Include.NON_NULL) 41 | @Schema(description = "게시판 속성 리스트", example = "") 42 | private List attrbList; 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/egovframework/let/cop/bbs/dto/response/BbsListResponseDTO.java: -------------------------------------------------------------------------------- 1 | package egovframework.let.cop.bbs.dto.response; 2 | 3 | import java.util.List; 4 | 5 | import org.egovframe.rte.ptl.mvc.tags.ui.pagination.PaginationInfo; 6 | 7 | import io.swagger.v3.oas.annotations.media.Schema; 8 | import lombok.Builder; 9 | import lombok.Getter; 10 | import lombok.Setter; 11 | 12 | /** 13 | * 게시판 리스트를 반환하는 응답 DTO 클래스 입니다. 14 | * 15 | * @author 김재섭(nirsa) 16 | * @since 2025.04.10 17 | * @version 1.0 18 | * @see 19 | * 20 | *
    21 |  * << 개정이력(Modification Information) >>
    22 |  *   
    23 |  *   수정일          수정자         수정내용
    24 |  *   ----------    ------------     -------------------
    25 |  *   2025.04.10    김재섭(nirsa)      최초 생성 
    26 |  *
    27 |  * 
    28 | */ 29 | 30 | @Getter 31 | @Builder 32 | @Schema(description = "게시판 리스트 조회 응답 DTO") 33 | public class BbsListResponseDTO { 34 | private List resultList; 35 | private int resultCnt; 36 | 37 | @Setter 38 | private PaginationInfo paginationInfo; 39 | 40 | @Builder.Default 41 | @Schema(description = "응답 코드", example="") 42 | private int resultCode = 0; 43 | 44 | @Builder.Default 45 | @Schema(description = "응답 메시지", example="") 46 | private String resultMessage = "OK"; 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/egovframework/let/cop/bbs/service/EgovBBSLoneMasterService.java: -------------------------------------------------------------------------------- 1 | package egovframework.let.cop.bbs.service; 2 | 3 | import java.util.Map; 4 | 5 | import egovframework.let.cop.bbs.domain.model.BoardMaster; 6 | import egovframework.let.cop.bbs.domain.model.BoardMasterVO; 7 | 8 | /** 9 | * 게시판 속성관리를 위한 서비스 인터페이스 클래스 10 | * @author 공통 서비스 개발팀 한성곤 11 | * @since 2009.08.25 12 | * @version 1.0 13 | * @see 14 | * 15 | *
    16 |  * << 개정이력(Modification Information) >>
    17 |  * 
    18 |  *   수정일      수정자          수정내용
    19 |  *  -------    --------    ---------------------------
    20 |  *  2009.08.25  한성곤          최초 생성
    21 |  *  2011.08.31  JJY            경량환경 템플릿 커스터마이징버전 생성 
    22 |  *  
    23 |  *  
    24 | */ 25 | public interface EgovBBSLoneMasterService { 26 | 27 | /** 28 | * 등록된 게시판 속성정보를 삭제한다. 29 | * @param BoardMaster 30 | * 31 | * @param boardMaster 32 | * @exception Exception Exception 33 | */ 34 | public void deleteMaster(BoardMaster boardMaster) 35 | throws Exception; 36 | 37 | /** 38 | * 신규 게시판 속성정보를 생성한다. 39 | * @param BoardMaster 40 | * 41 | * @param boardMaster 42 | * @exception Exception Exception 43 | */ 44 | public String insertMaster(BoardMaster boardMaster) 45 | throws Exception; 46 | 47 | /** 48 | * 게시판 속성정보 한 건을 상세조회한다. 49 | * @param BoardMasterVO 50 | * 51 | * @param searchVO 52 | * @exception Exception Exception 53 | */ 54 | public BoardMasterVO selectMaster(BoardMaster searchVO) 55 | throws Exception; 56 | 57 | /** 58 | * 게시판 속성 정보의 목록을 조회 한다. 59 | * @param BoardMasterVO 60 | * 61 | * @param searchVO 62 | * @exception Exception Exception 63 | */ 64 | public Map selectMasterList(BoardMasterVO searchVO) 65 | throws Exception; 66 | 67 | /** 68 | * 게시판 속성정보를 수정한다. 69 | * @param BoardMaster 70 | * 71 | * @param boardMaster 72 | * @exception Exception Exception 73 | */ 74 | public void updateMaster(BoardMaster boardMaster) 75 | throws Exception; 76 | 77 | } -------------------------------------------------------------------------------- /src/main/java/egovframework/let/cop/bbs/service/EgovBBSManageService.java: -------------------------------------------------------------------------------- 1 | package egovframework.let.cop.bbs.service; 2 | 3 | import java.util.Map; 4 | 5 | import egovframework.let.cop.bbs.domain.model.Board; 6 | import egovframework.let.cop.bbs.domain.model.BoardVO; 7 | 8 | /** 9 | * 게시물 관리를 위한 서비스 인터페이스 클래스 10 | * @author 공통 서비스 개발팀 이삼섭 11 | * @since 2009.03.19 12 | * @version 1.0 13 | * @see 14 | * 15 | *
     16 |  * << 개정이력(Modification Information) >>
     17 |  * 
     18 |  *   수정일      수정자          수정내용
     19 |  *  -------    --------    ---------------------------
     20 |  *  2009.03.19  이삼섭          최초 생성
     21 |  *  2011.08.31  JJY            경량환경 템플릿 커스터마이징버전 생성 
     22 |  *  
     23 |  *  
    24 | */ 25 | public interface EgovBBSManageService { 26 | 27 | /** 28 | * 게시물 한 건을 삭제 한다. 29 | * 30 | * @param Board 31 | * @exception Exception Exception 32 | */ 33 | public void deleteBoardArticle(Board Board) 34 | throws Exception; 35 | 36 | /** 37 | * 방명록 내용을 삭제 한다. 38 | * 39 | * @param boardVO 40 | * @exception Exception Exception 41 | */ 42 | public void deleteGuestList(BoardVO boardVO) 43 | throws Exception; 44 | 45 | /** 46 | * 방명록에 대한 패스워드를 조회 한다. 47 | * @return 48 | * 49 | * @param Board 50 | * @exception Exception Exception 51 | */ 52 | public String getPasswordInf(Board Board) 53 | throws Exception; 54 | 55 | /** 56 | * 게시판에 게시물 또는 답변 게시물을 등록 한다. 57 | * 58 | * @param Board 59 | * @exception Exception Exception 60 | */ 61 | public void insertBoardArticle(Board Board) 62 | throws Exception; 63 | 64 | /** 65 | * 게시물 대하여 상세 내용을 조회 한다. 66 | * @return 67 | * 68 | * @param boardVO 69 | * @exception Exception Exception 70 | */ 71 | public BoardVO selectBoardArticle(BoardVO boardVO) 72 | throws Exception; 73 | 74 | /** 75 | * 조건에 맞는 게시물 목록을 조회 한다. 76 | * @return 77 | * 78 | * @param boardVO 79 | * @param attrbFlag 80 | * @exception Exception Exception 81 | */ 82 | public Map selectBoardArticles(BoardVO boardVO, String attrbFlag) 83 | throws Exception; 84 | 85 | /** 86 | * 방명록에 대한 목록을 조회 한다. 87 | * @return 88 | * 89 | * @param boardVO 90 | * @exception Exception Exception 91 | */ 92 | public Map selectGuestList(BoardVO boardVO) 93 | throws Exception; 94 | 95 | /** 96 | * 게시물 한 건의 내용을 수정 한다. 97 | * 98 | * @param Board 99 | * @exception Exception Exception 100 | */ 101 | public void updateBoardArticle(Board Board) 102 | throws Exception; 103 | 104 | } -------------------------------------------------------------------------------- /src/main/java/egovframework/let/cop/com/service/BoardUseInf.java: -------------------------------------------------------------------------------- 1 | package egovframework.let.cop.com.service; 2 | 3 | import java.io.Serializable; 4 | 5 | import lombok.Getter; 6 | import lombok.Setter; 7 | import org.apache.commons.lang3.builder.ToStringBuilder; 8 | 9 | import io.swagger.v3.oas.annotations.media.Schema; 10 | 11 | 12 | /** 13 | * 게시판의 이용정보를 관리하기 위한 모델 클래스 14 | * @author 공통서비스개발팀 이삼섭 15 | * @since 2009.04.02 16 | * @version 1.0 17 | * @see 18 | * 19 | *
    20 |  * << 개정이력(Modification Information) >>
    21 |  *
    22 |  *   수정일      수정자           수정내용
    23 |  *  -------    --------    ---------------------------
    24 |  *   2009.04.02  이삼섭          최초 생성
    25 |  *   2011.08.31  JJY            경량환경 커스터마이징버전 생성
    26 |  *
    27 |  * 
    28 | */ 29 | @Schema(description = "게시판 이용정보 모델") 30 | @Getter 31 | @Setter 32 | public class BoardUseInf implements Serializable { 33 | 34 | /** 35 | * serialVersion UID 36 | */ 37 | private static final long serialVersionUID = -8164785314697750055L; 38 | 39 | @Schema(description = "게시판 아이디") 40 | private String bbsId = ""; 41 | 42 | @Schema(description = "대상시스템 아이디") 43 | private String trgetId = ""; 44 | 45 | @Schema(description = "대상 구분 (커뮤니티, 동호회)") 46 | private String trgetType = ""; 47 | 48 | @Schema(description = "최초 등록자 아이디") 49 | private String frstRegisterId = ""; 50 | 51 | @Schema(description = "최초등록시점") 52 | private String frstRegisterPnttm = ""; 53 | 54 | @Schema(description = "최종수정자 아이디") 55 | private String lastUpdusrId = ""; 56 | 57 | @Schema(description = "최종수정시점") 58 | private String lastUpdusrPnttm = ""; 59 | 60 | @Schema(description = "등록구분코드") 61 | private String registSeCode = ""; 62 | 63 | @Schema(description = "사용여부", allowableValues = {"Y", "N"}) 64 | private String useAt = ""; 65 | 66 | 67 | 68 | /** 69 | * toString 메소드를 대치한다. 70 | */ 71 | public String toString() { 72 | return ToStringBuilder.reflectionToString(this); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/main/java/egovframework/let/cop/com/service/EgovUserInfManageService.java: -------------------------------------------------------------------------------- 1 | package egovframework.let.cop.com.service; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | /** 7 | * 협업 기능에서 사용자 정보를 관리하기 위한 서비스 인터페이스 클래스 8 | * @author 공통서비스개발팀 이삼섭 9 | * @since 2009.04.06 10 | * @version 1.0 11 | * @see 12 | * 13 | *
    14 |  * << 개정이력(Modification Information) >>
    15 |  *   
    16 |  *   수정일      수정자           수정내용
    17 |  *  -------    --------    ---------------------------
    18 |  *   2009.04.06  이삼섭          최초 생성
    19 |  *   2011.08.31  JJY            경량환경 템플릿 커스터마이징버전 생성 
    20 |  *
    21 |  * 
    22 | */ 23 | public interface EgovUserInfManageService { 24 | 25 | /** 26 | * 사용자 정보에 대한 목록을 조회한다. 27 | * 28 | * @param userVO 29 | * @return 30 | * @throws Exception 31 | */ 32 | public Map selectUserList(UserInfVO userVO) throws Exception; 33 | 34 | /** 35 | * 커뮤니티 사용자 목록을 조회한다. 36 | * 37 | * @param userVO 38 | * @return 39 | * @throws Exception 40 | */ 41 | public Map selectCmmntyUserList(UserInfVO userVO) throws Exception; 42 | 43 | /** 44 | * 커뮤니티 관리자 목록을 조회한다. 45 | * 46 | * @param userVO 47 | * @return 48 | * @throws Exception 49 | */ 50 | public Map selectCmmntyMngrList(UserInfVO userVO) throws Exception; 51 | 52 | /** 53 | * 동호회 사용자 목록을 조회한다. 54 | * 55 | * @param userVO 56 | * @return 57 | * @throws Exception 58 | */ 59 | public Map selectClubUserList(UserInfVO userVO) throws Exception; 60 | 61 | /** 62 | * 동호회 운영자 목록을 조회한다. 63 | * 64 | * @param userVO 65 | * @return 66 | * @throws Exception 67 | */ 68 | public Map selectClubOprtrList(UserInfVO userVO) throws Exception; 69 | 70 | /** 71 | * 동호회에 대한 모든 사용자 목록을 조회한다. 72 | * 73 | * @param userVO 74 | * @return 75 | * @throws Exception 76 | */ 77 | public List selectAllClubUser(UserInfVO userVO) throws Exception; 78 | 79 | /** 80 | * 커뮤니티에 대한 모든 사용자 목록을 조회한다. 81 | * 82 | * @param userVO 83 | * @return 84 | * @throws Exception 85 | */ 86 | public List selectAllCmmntyUser(UserInfVO userVO) throws Exception; 87 | } 88 | -------------------------------------------------------------------------------- /src/main/java/egovframework/let/cop/com/service/UserInfVO.java: -------------------------------------------------------------------------------- 1 | package egovframework.let.cop.com.service; 2 | 3 | import java.io.Serializable; 4 | 5 | import lombok.Getter; 6 | import lombok.Setter; 7 | import org.apache.commons.lang3.builder.ToStringBuilder; 8 | 9 | /** 10 | * 사용자 정보 조회를 위한 VO 클래스 11 | * @author 공통서비스개발팀 이삼섭 12 | * @since 2009.04.06 13 | * @version 1.0 14 | * @see 15 | * 16 | *
     17 |  * << 개정이력(Modification Information) >>
     18 |  *
     19 |  *   수정일      수정자           수정내용
     20 |  *  -------    --------    ---------------------------
     21 |  *   2009.04.06  이삼섭          최초 생성
     22 |  *   2011.08.31  JJY            경량환경 템플릿 커스터마이징버전 생성
     23 |  *
     24 |  * 
    25 | */ 26 | @Getter 27 | @Setter 28 | public class UserInfVO implements Serializable { 29 | 30 | /** 31 | * serialVersion UID 32 | */ 33 | private static final long serialVersionUID = -6156707290504312279L; 34 | 35 | /** 유일 아이디 */ 36 | private String uniqId = ""; 37 | 38 | /** 사용자 아이디 */ 39 | private String userId = ""; 40 | 41 | /** 사용자 명 */ 42 | private String userNm = ""; 43 | 44 | /** 사용자 우편번호 */ 45 | private String userZip = ""; 46 | 47 | /** 사용자 주소 */ 48 | private String userAdres = ""; 49 | 50 | /** 사용자 이메일 */ 51 | private String userEmail = ""; 52 | 53 | /** 검색시작일 */ 54 | private String searchBgnDe = ""; 55 | 56 | /** 검색조건 */ 57 | private String searchCnd = ""; 58 | 59 | /** 검색종료일 */ 60 | private String searchEndDe = ""; 61 | 62 | /** 검색단어 */ 63 | private String searchWrd = ""; 64 | 65 | /** 정렬순서(DESC,ASC) */ 66 | private String sortOrdr = ""; 67 | 68 | /** 검색사용여부 */ 69 | private String searchUseYn = ""; 70 | 71 | /** 현재페이지 */ 72 | private int pageIndex = 1; 73 | 74 | /** 페이지갯수 */ 75 | private int pageUnit = 10; 76 | 77 | /** 페이지사이즈 */ 78 | private int pageSize = 10; 79 | 80 | /** 첫페이지 인덱스 */ 81 | private int firstIndex = 1; 82 | 83 | /** 마지막페이지 인덱스 */ 84 | private int lastIndex = 1; 85 | 86 | /** 페이지당 레코드 개수 */ 87 | private int recordCountPerPage = 10; 88 | 89 | /** 레코드 번호 */ 90 | private int rowNo = 0; 91 | 92 | /** 대상 아이디 */ 93 | private String trgetId = ""; 94 | 95 | /** 사용여부 */ 96 | private String useAt = "Y"; 97 | 98 | /** 커뮤니티 아이디 */ 99 | private String cmmntyId = ""; 100 | 101 | /** 동호회 아이디 */ 102 | private String clubId = ""; 103 | 104 | /** 대상 중지 여부 (커뮤니티 또는 동호회) */ 105 | private String deletedAt = "N"; 106 | 107 | /** 108 | * toString 메소드를 대치한다. 109 | */ 110 | public String toString() { 111 | return ToStringBuilder.reflectionToString(this); 112 | } 113 | } -------------------------------------------------------------------------------- /src/main/java/egovframework/let/cop/smt/sim/service/ScheduleSearchVO.java: -------------------------------------------------------------------------------- 1 | package egovframework.let.cop.smt.sim.service; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | import lombok.Getter; 5 | import lombok.Setter; 6 | 7 | @Getter 8 | @Setter 9 | @Schema(description = "일정 검색 조건 VO") 10 | public class ScheduleSearchVO { 11 | 12 | @Schema(description = "조회 모드 (DAILY, WEEK, MONTH)", example = "DAILY") 13 | private String searchMode; 14 | 15 | @Schema(description = "조회 연도", example = "2025") 16 | private String year; 17 | 18 | @Schema(description = "조회 월 (1~12)", example = "5") 19 | private String month; 20 | 21 | @Schema(description = "조회 일 (1~31)", example = "7") 22 | private String date; 23 | 24 | @Schema(description = "검색 조건", example = "title") 25 | private String searchCondition; 26 | 27 | @Schema(description = "검색어", example = "회의") 28 | private String searchKeyword; 29 | 30 | // 일별 검색 시 사용할 전체일자 (yyyyMMdd) 31 | @Schema(description = "일별 조회용 검색일자 (yyyyMMdd)", example = "20250507") 32 | private String searchDay; 33 | 34 | // 주간 조회 시 사용할 시작일자 35 | @Schema(description = "주간 조회 시작일자 (yyyyMMdd)", example = "20250506") 36 | private String schdulBgnde; 37 | 38 | // 주간 조회 시 사용할 종료일자 39 | @Schema(description = "주간 조회 종료일자 (yyyyMMdd)", example = "20250512") 40 | private String schdulEndde; 41 | } -------------------------------------------------------------------------------- /src/main/java/egovframework/let/main/service/EgovMainContentsVO.java: -------------------------------------------------------------------------------- 1 | package egovframework.let.main.service; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * 템플릿 메인화면 작업 List 항목 VO(Sample 소스) 7 | * @author 실행환경 개발팀 JJY 8 | * @since 2011.08.31 9 | * @version 1.0 10 | * @see 11 | * 12 | *
    13 |  * << 개정이력(Modification Information) >>
    14 |  *   
    15 |  *   수정일      수정자           수정내용
    16 |  *  -------    --------    ---------------------------
    17 |  *   2011.08.31  JJY            최초 생성
    18 |  *
    19 |  * 
    20 | */ 21 | public class EgovMainContentsVO implements Serializable { 22 | 23 | /** 24 | * serialVersionUID 25 | */ 26 | private static final long serialVersionUID = -2202175699511921484L; 27 | /** 28 | * 작업항목 이름 29 | */ 30 | private String workItemName; 31 | /** 32 | * To-Do List 항목 별 업무화면 URL 33 | */ 34 | private String workItemURL; 35 | 36 | /** 37 | * getItemCount 항목 개수 getter 38 | * @return 39 | */ 40 | public int getItemCount(){ 41 | return 0; 42 | } 43 | 44 | /** 45 | * getWorkItemName To-Do List 항목 명 getter 46 | * @return To-Do List 항목 명 47 | */ 48 | public String getWorkItemName(){ 49 | return workItemName; 50 | } 51 | 52 | /** 53 | * getWorkItemURL 업무화면 URL getter 54 | * @return 업무화면 URL 55 | */ 56 | public String getWorkItemURL(){ 57 | return workItemURL; 58 | } 59 | } -------------------------------------------------------------------------------- /src/main/java/egovframework/let/uat/esm/service/EgovSiteManagerService.java: -------------------------------------------------------------------------------- 1 | package egovframework.let.uat.esm.service; 2 | 3 | import java.util.Map; 4 | 5 | /** 6 | * 사이트관리자의 로그인 비밀번호를 변경 처리하는 비즈니스 구현 클래스 7 | * @author 공통서비스 개발팀 8 | * @since 2023.04.15 9 | * @version 1.0 10 | * @see 11 | * 12 | *
    13 |  * << 개정이력(Modification Information) >>
    14 |  *
    15 |  *   수정일      수정자          수정내용
    16 |  *  -------    --------    ---------------------------
    17 |  *  2023.04.15  김일국          최초 생성
    18 |  *
    19 |  *  
    20 | */ 21 | public interface EgovSiteManagerService { 22 | /** 23 | * 기존 비번과 비교하여 변경된 비밀번호를 저장한다. 24 | * @param map데이터 String: login_id, old_password, new_password 25 | * @return 성공시 1 26 | * @throws Exception 27 | */ 28 | Integer updateAdminPassword(Map map) throws Exception; 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/egovframework/let/uat/esm/service/impl/EgovSiteManagerServiceImpl.java: -------------------------------------------------------------------------------- 1 | package egovframework.let.uat.esm.service.impl; 2 | 3 | import java.util.Map; 4 | 5 | import javax.annotation.Resource; 6 | 7 | import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl; 8 | import org.springframework.stereotype.Service; 9 | 10 | import egovframework.let.uat.esm.service.EgovSiteManagerService; 11 | 12 | /** 13 | * 사이트관리자의 로그인 비밀번호를 변경 처리하는 비즈니스 구현 클래스 14 | * @author 공통서비스 개발팀 15 | * @since 2023.04.15 16 | * @version 1.0 17 | * @see 18 | * 19 | *
    20 |  * << 개정이력(Modification Information) >>
    21 |  *
    22 |  *   수정일      수정자          수정내용
    23 |  *  -------    --------    ---------------------------
    24 |  *  2023.04.15  김일국          최초 생성
    25 |  *
    26 |  *  
    27 | */ 28 | @Service("siteManagerService") 29 | public class EgovSiteManagerServiceImpl extends EgovAbstractServiceImpl implements EgovSiteManagerService { 30 | @Resource(name = "siteManagerDAO") 31 | private SiteManagerDAO siteManagerDAO; 32 | /** 33 | * 기존 비번과 비교하여 변경된 비밀번호를 저장한다. 34 | * @param map데이터 String: login_id, old_password, new_password 35 | * @return 성공시 1 36 | * @throws Exception 37 | */ 38 | @Override 39 | public Integer updateAdminPassword(Map map) throws Exception { 40 | return siteManagerDAO.updateAdminPassword(map); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/egovframework/let/uat/esm/service/impl/SiteManagerDAO.java: -------------------------------------------------------------------------------- 1 | package egovframework.let.uat.esm.service.impl; 2 | 3 | import java.util.Map; 4 | 5 | import org.egovframe.rte.psl.dataaccess.EgovAbstractMapper; 6 | import org.springframework.stereotype.Repository; 7 | 8 | /** 9 | * 사이트관리자의 로그인 비밀번호를 변경 처리하는 비즈니스 구현 클래스 10 | * @author 공통서비스 개발팀 11 | * @since 2023.04.15 12 | * @version 1.0 13 | * @see 14 | * 15 | *
    16 |  * << 개정이력(Modification Information) >>
    17 |  *
    18 |  *   수정일      수정자          수정내용
    19 |  *  -------    --------    ---------------------------
    20 |  *  2023.04.15  김일국          최초 생성
    21 |  *
    22 |  *  
    23 | */ 24 | @Repository("siteManagerDAO") 25 | public class SiteManagerDAO extends EgovAbstractMapper { 26 | /** 27 | * 기존 비번과 비교하여 변경된 비밀번호를 저장한다. 28 | * @param map데이터 String: login_id, old_password, new_password 29 | * @return 성공시 1 30 | * @exception Exception 31 | */ 32 | public Integer updateAdminPassword(Map map) throws Exception { 33 | return update("siteManagerDAO.updateAdminPassword", map); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/egovframework/let/uat/uia/service/EgovLoginService.java: -------------------------------------------------------------------------------- 1 | package egovframework.let.uat.uia.service; 2 | 3 | import egovframework.com.cmm.LoginVO; 4 | 5 | /** 6 | * 일반 로그인을 처리하는 비즈니스 구현 클래스 7 | * @author 공통서비스 개발팀 박지욱 8 | * @since 2009.03.06 9 | * @version 1.0 10 | * @see 11 | * 12 | *
    13 |  * << 개정이력(Modification Information) >>
    14 |  *
    15 |  *   수정일      수정자          수정내용
    16 |  *  -------    --------    ---------------------------
    17 |  *  2009.03.06  박지욱          최초 생성
    18 |  *  2011.08.31  JJY            경량환경 템플릿 커스터마이징버전 생성
    19 |  *
    20 |  *  
    21 | */ 22 | public interface EgovLoginService { 23 | 24 | /** 25 | * 일반 로그인을 처리한다 26 | * @return LoginVO 27 | * 28 | * @param vo LoginVO 29 | * @exception Exception Exception 30 | */ 31 | public LoginVO actionLogin(LoginVO vo) throws Exception; 32 | 33 | /** 34 | * 아이디를 찾는다. 35 | * @return LoginVO 36 | * 37 | * @param vo LoginVO 38 | * @exception Exception Exception 39 | */ 40 | public LoginVO searchId(LoginVO vo) throws Exception; 41 | 42 | /** 43 | * 비밀번호를 찾는다. 44 | * @return boolean 45 | * 46 | * @param vo LoginVO 47 | * @exception Exception Exception 48 | */ 49 | public boolean searchPassword(LoginVO vo) throws Exception; 50 | 51 | } -------------------------------------------------------------------------------- /src/main/java/egovframework/let/uat/uia/service/impl/LoginDAO.java: -------------------------------------------------------------------------------- 1 | package egovframework.let.uat.uia.service.impl; 2 | 3 | import egovframework.com.cmm.LoginVO; 4 | 5 | import org.egovframe.rte.psl.dataaccess.EgovAbstractMapper; 6 | 7 | import org.springframework.stereotype.Repository; 8 | 9 | /** 10 | * 일반 로그인을 처리하는 비즈니스 구현 클래스 11 | * @author 공통서비스 개발팀 박지욱 12 | * @since 2009.03.06 13 | * @version 1.0 14 | * @see 15 | * 16 | *
    17 |  * << 개정이력(Modification Information) >>
    18 |  *
    19 |  *   수정일      수정자          수정내용
    20 |  *  -------    --------    ---------------------------
    21 |  *  2009.03.06  박지욱          최초 생성
    22 |  *  2011.08.31  JJY            경량환경 템플릿 커스터마이징버전 생성
    23 |  *
    24 |  *  
    25 | */ 26 | @Repository("loginDAO") 27 | public class LoginDAO extends EgovAbstractMapper { 28 | 29 | /** 30 | * 일반 로그인을 처리한다 31 | * @param vo LoginVO 32 | * @return LoginVO 33 | * @exception Exception 34 | */ 35 | public LoginVO actionLogin(LoginVO vo) throws Exception { 36 | return (LoginVO) selectOne("loginDAO.actionLogin", vo); 37 | } 38 | 39 | /** 40 | * 아이디를 찾는다. 41 | * @param vo LoginVO 42 | * @return LoginVO 43 | * @exception Exception 44 | */ 45 | public LoginVO searchId(LoginVO vo) throws Exception { 46 | return (LoginVO) selectOne("loginDAO.searchId", vo); 47 | } 48 | 49 | /** 50 | * 비밀번호를 찾는다. 51 | * @param vo LoginVO 52 | * @return LoginVO 53 | * @exception Exception 54 | */ 55 | public LoginVO searchPassword(LoginVO vo) throws Exception { 56 | return (LoginVO) selectOne("loginDAO.searchPassword", vo); 57 | } 58 | 59 | /** 60 | * 변경된 비밀번호를 저장한다. 61 | * @param vo LoginVO 62 | * @exception Exception 63 | */ 64 | public void updatePassword(LoginVO vo) throws Exception { 65 | update("loginDAO.updatePassword", vo); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/main/java/egovframework/let/uss/umt/service/EgovMberManageService.java: -------------------------------------------------------------------------------- 1 | package egovframework.let.uss.umt.service; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * 일반회원관리에 관한 인터페이스클래스를 정의한다. 7 | * @author 공통서비스 개발팀 조재영 8 | * @since 2009.04.10 9 | * @version 1.0 10 | * @see 11 | * 12 | *
     13 |  * << 개정이력(Modification Information) >>
     14 |  *
     15 |  *   수정일      수정자           수정내용
     16 |  *  -------    --------    ---------------------------
     17 |  *   2009.04.10  조재영          최초 생성
     18 |  *   2011.08.31  JJY            경량환경 템플릿 커스터마이징버전 생성
     19 |  *
     20 |  * 
    21 | */ 22 | public interface EgovMberManageService { 23 | 24 | /** 25 | * 사용자의 기본정보를 화면에서 입력하여 항목의 정합성을 체크하고 데이터베이스에 저장 26 | * @param mberManageVO 일반회원 등록정보 27 | * @return 등록결과 28 | * @throws Exception 29 | */ 30 | public int insertMber(MberManageVO mberManageVO) throws Exception; 31 | 32 | /** 33 | * 기 등록된 사용자 중 검색조건에 맞는 일반회원의 정보를 데이터베이스에서 읽어와 화면에 출력 34 | * @param mberId 상세조회대상 일반회원아이디 35 | * @return mberManageVO 일반회원상세정보 36 | * @throws Exception 37 | */ 38 | public MberManageVO selectMber(String mberId) throws Exception; 39 | 40 | /** 41 | * 기 등록된 회원 중 검색조건에 맞는 회원들의 정보를 데이터베이스에서 읽어와 화면에 출력 42 | * @param userSearchVO 검색조건 43 | * @return List 일반회원목록정보 44 | * @throws Exception 45 | */ 46 | public List selectMberList(UserDefaultVO userSearchVO) throws Exception; 47 | 48 | /** 49 | * 일반회원 총 갯수를 조회한다. 50 | * @param userSearchVO 검색조건 51 | * @return 일반회원총갯수(int) 52 | * @throws Exception 53 | */ 54 | public int selectMberListTotCnt(UserDefaultVO userSearchVO) throws Exception; 55 | 56 | /** 57 | * 화면에 조회된 일반회원의 기본정보를 수정하여 항목의 정합성을 체크하고 수정된 데이터를 데이터베이스에 반영 58 | * @param mberManageVO 일반회원수정정보 59 | * @throws Exception 60 | */ 61 | public void updateMber(MberManageVO mberManageVO) throws Exception; 62 | 63 | /** 64 | * 화면에 조회된 사용자의 정보를 데이터베이스에서 삭제 65 | * @param checkedIdForDel 삭제대상 일반회원아이디 66 | * @throws Exception 67 | */ 68 | public void deleteMber(String checkedIdForDel) throws Exception; 69 | 70 | /** 71 | * 일반회원 약관확인 72 | * @param stplatId 일반회원약관아이디 73 | * @return 일반회원약관정보(List) 74 | * @throws Exception 75 | */ 76 | public List selectStplat(String stplatId) throws Exception; 77 | 78 | /** 79 | * 일반회원암호수정 80 | * @param mberManageVO 일반회원수정정보(비밀번호) 81 | * @throws Exception 82 | */ 83 | public void updatePassword(MberManageVO mberManageVO) throws Exception; 84 | 85 | /** 86 | * 일반회원이 비밀번호를 기억하지 못할 때 비밀번호를 찾을 수 있도록 함 87 | * @param passVO 일반회원암호 조회조건정보 88 | * @return mberManageVO 일반회원암호정보 89 | * @throws Exception 90 | */ 91 | public MberManageVO selectPassword(MberManageVO passVO) throws Exception; 92 | 93 | /** 94 | * 입력한 사용자아이디의 중복여부를 체크하여 사용가능여부를 확인 95 | * @param checkId 중복여부 확인대상 아이디 96 | * @return 사용가능여부(아이디 사용회수 int) 97 | * @throws Exception 98 | */ 99 | public int checkIdDplct(String checkId) throws Exception; 100 | 101 | } -------------------------------------------------------------------------------- /src/main/java/egovframework/let/uss/umt/service/MberManageVO.java: -------------------------------------------------------------------------------- 1 | package egovframework.let.uss.umt.service; 2 | 3 | import java.io.Serializable; 4 | 5 | import org.apache.commons.lang3.builder.ToStringBuilder; 6 | 7 | import io.swagger.v3.oas.annotations.media.Schema; 8 | import lombok.Getter; 9 | import lombok.Setter; 10 | 11 | /** 12 | * 일반회원VO클래스로서 일반회원관리 비지니스로직 처리용 항목을 구성한다. 13 | * @author 공통서비스 개발팀 조재영 14 | * @since 2009.04.10 15 | * @version 1.0 16 | * @see 17 | * 18 | *
     19 |  * << 개정이력(Modification Information) >>
     20 |  *   
     21 |  *   수정일      수정자           수정내용
     22 |  *  -------    --------    ---------------------------
     23 |  *   2009.04.10  JJY            최초 생성
     24 |  *   2011.08.31  JJY            경량환경 템플릿 커스터마이징버전 생성 
     25 |  *	 2024.07.24	 김일국			스프링부트 롬복사용으로 변경
     26 |  * 
    27 | */ 28 | @Schema(description = "회원 VO") 29 | @Getter 30 | @Setter 31 | public class MberManageVO extends UserDefaultVO implements Serializable{ 32 | 33 | /** 34 | * serialVersionUID 35 | */ 36 | private static final long serialVersionUID = 1L; 37 | 38 | @Schema(description = "이전비밀번호") 39 | private String oldPassword = ""; 40 | 41 | @Schema(description = "사용자고유아이디") 42 | private String uniqId=""; 43 | 44 | @Schema(description = "사용자 유형") 45 | private String userTy=""; 46 | 47 | @Schema(description = "주소") 48 | private String adres=""; 49 | 50 | @Schema(description = "상세주소") 51 | private String detailAdres=""; 52 | 53 | @Schema(description = "끝전화번호") 54 | private String endTelno=""; 55 | 56 | @Schema(description = "팩스번호") 57 | private String mberFxnum=""; 58 | 59 | @Schema(description = "조직 ID") 60 | private String orgnztId=""; 61 | 62 | @Schema(description = "그룹 ID") 63 | private String groupId=""; 64 | 65 | @Schema(description = "주민등록번호") 66 | private String ihidnum=""; 67 | 68 | @Schema(description = "성별코드") 69 | private String sexdstnCode=""; 70 | 71 | @Schema(description = "회원 ID") 72 | private String mberId; 73 | 74 | @Schema(description = "회원명") 75 | private String mberNm; 76 | 77 | @Schema(description = "회원상태") 78 | private String mberSttus; 79 | 80 | @Schema(description = "지역번호") 81 | private String areaNo=""; 82 | 83 | @Schema(description = "중간전화번호") 84 | private String middleTelno=""; 85 | 86 | @Schema(description = "핸드폰번호") 87 | private String moblphonNo=""; 88 | 89 | @Schema(description = "비밀번호") 90 | private String password; 91 | 92 | @Schema(description = "비밀번호 정답") 93 | private String passwordCnsr=""; 94 | 95 | @Schema(description = "비밀번호 힌트") 96 | private String passwordHint=""; 97 | 98 | @Schema(description = "가입 일자") 99 | private String sbscrbDe; 100 | 101 | @Schema(description = "우편번호") 102 | private String zip=""; 103 | 104 | @Schema(description = "이메일주소") 105 | private String mberEmailAdres=""; 106 | 107 | /** 108 | * toString 메소드를 대치한다. 109 | */ 110 | @Override 111 | public String toString() { 112 | return ToStringBuilder.reflectionToString(this); 113 | } 114 | } -------------------------------------------------------------------------------- /src/main/java/egovframework/let/uss/umt/service/StplatVO.java: -------------------------------------------------------------------------------- 1 | package egovframework.let.uss.umt.service; 2 | 3 | import java.io.Serializable; 4 | 5 | import org.apache.commons.lang3.builder.ToStringBuilder; 6 | 7 | /** 8 | * 가입약관VO클래스로서가입약관확인시 비지니스로직 처리용 항목을 구성한다. 9 | * @author 공통서비스 개발팀 조재영 10 | * @since 2009.04.10 11 | * @version 1.0 12 | * @see 13 | * 14 | *
    15 |  * << 개정이력(Modification Information) >>
    16 |  *   
    17 |  *   수정일      수정자           수정내용
    18 |  *  -------    --------    ---------------------------
    19 |  *   2009.04.10  조재영          최초 생성
    20 |  *   2011.08.31  JJY            경량환경 템플릿 커스터마이징버전 생성 
    21 |  *
    22 |  * 
    23 | */ 24 | public class StplatVO implements Serializable { 25 | /** 26 | * serialVersionUID 27 | */ 28 | private static final long serialVersionUID = 1L; 29 | 30 | /** 약관아이디*/ 31 | private String useStplatId; 32 | 33 | /** 사용약관안내*/ 34 | private String useStplatCn; 35 | 36 | /** 정보동의안내*/ 37 | private String infoProvdAgeCn; 38 | 39 | /** 40 | * useStplatId attribute 값을 리턴한다. 41 | * @return String 42 | */ 43 | public String getUseStplatId() { 44 | return useStplatId; 45 | } 46 | 47 | /** 48 | * useStplatId attribute 값을 설정한다. 49 | * @param useStplatId String 50 | */ 51 | public void setUseStplatId(String useStplatId) { 52 | this.useStplatId = useStplatId; 53 | } 54 | 55 | /** 56 | * useStplatCn attribute 값을 리턴한다. 57 | * @return String 58 | */ 59 | public String getUseStplatCn() { 60 | return useStplatCn; 61 | } 62 | 63 | /** 64 | * useStplatCn attribute 값을 설정한다. 65 | * @param useStplatCn String 66 | */ 67 | public void setUseStplatCn(String useStplatCn) { 68 | this.useStplatCn = useStplatCn; 69 | } 70 | 71 | /** 72 | * infoProvdAgeCn attribute 값을 리턴한다. 73 | * @return String 74 | */ 75 | public String getInfoProvdAgeCn() { 76 | return infoProvdAgeCn; 77 | } 78 | 79 | /** 80 | * infoProvdAgeCn attribute 값을 설정한다. 81 | * @param infoProvdAgeCn String 82 | */ 83 | public void setInfoProvdAgeCn(String infoProvdAgeCn) { 84 | this.infoProvdAgeCn = infoProvdAgeCn; 85 | } 86 | 87 | /** 88 | * toString 메소드를 대치한다. 89 | */ 90 | public String toString() { 91 | return ToStringBuilder.reflectionToString(this); 92 | } 93 | 94 | } -------------------------------------------------------------------------------- /src/main/java/egovframework/let/utl/fcc/service/EgovFormBasedFileVo.java: -------------------------------------------------------------------------------- 1 | package egovframework.let.utl.fcc.service; 2 | 3 | import java.io.Serializable; 4 | 5 | import lombok.Getter; 6 | import lombok.Setter; 7 | 8 | /** 9 | * @Class Name : EgovFormBasedFileVo.java 10 | * @Description : Form-based File Upload VO 11 | * @Modification Information 12 | * 13 | * 수정일 수정자 수정내용 14 | * ------- -------- --------------------------- 15 | * 2009.08.26 한성곤 최초 생성 16 | * 17 | * @author 공통컴포넌트 개발팀 한성곤 18 | * @since 2009.08.26 19 | * @version 1.0 20 | * @see 21 | * 22 | * Copyright (C) 2008 by MOPAS All right reserved. 23 | */ 24 | @SuppressWarnings("serial") 25 | @Getter 26 | @Setter 27 | public class EgovFormBasedFileVo implements Serializable { 28 | /** 파일명 */ 29 | private String fileName = ""; 30 | /** ContextType */ 31 | private String contentType = ""; 32 | /** 하위 디렉토리 지정 */ 33 | private String serverSubPath = ""; 34 | /** 물리적 파일명 */ 35 | private String physicalName = ""; 36 | /** 파일 사이즈 */ 37 | private long size = 0L; 38 | 39 | } -------------------------------------------------------------------------------- /src/main/resources/application-dev.properties: -------------------------------------------------------------------------------- 1 | # \uc6b4\uc601\uc11c\ubc84 \ud0c0\uc785(WINDOWS, UNIX) 2 | Globals.OsType=WINDOWS 3 | 4 | #hsql - local hssql \uc0ac\uc6a9\uc2dc\uc5d0 \uc801\uc6a9 (\ub0b4\uc7a5 hsql\uc740 \uc815\ubcf4 \ud544\uc694 \uc5c6\uc74c) 5 | Globals.hsql.DriverClassName=net.sf.log4jdbc.DriverSpy 6 | Globals.hsql.Url=jdbc:log4jdbc:hsqldb:hsql://127.0.0.1/sampledb 7 | Globals.hsql.UserName=sa 8 | Globals.hsql.Password= 9 | 10 | logging.rollingpolicy.maxHistory=2 11 | 12 | # File store Path 13 | Globals.fileStorePath=./files -------------------------------------------------------------------------------- /src/main/resources/application-prod.properties: -------------------------------------------------------------------------------- 1 | # \uc6b4\uc601\uc11c\ubc84 \ud0c0\uc785(WINDOWS, UNIX) 2 | Globals.OsType=LINUX 3 | 4 | #hsql - local hssql \uc0ac\uc6a9\uc2dc\uc5d0 \uc801\uc6a9 (\ub0b4\uc7a5 hsql\uc740 \uc815\ubcf4 \ud544\uc694 \uc5c6\uc74c) 5 | Globals.hsql.DriverClassName=net.sf.log4jdbc.DriverSpy 6 | Globals.hsql.Url=jdbc:log4jdbc:hsqldb:hsql://127.0.0.1/sampledb 7 | Globals.hsql.UserName=sa 8 | Globals.hsql.Password= 9 | 10 | logging.rollingpolicy.maxHistory=90 11 | 12 | # File store Path 13 | Globals.fileStorePath=./files -------------------------------------------------------------------------------- /src/main/resources/egovframework/mapper/config/mapper-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/main/resources/egovframework/mapper/let/cmm/use/EgovCmmUse_SQL_altibase.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 25 | 26 | 41 | 42 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /src/main/resources/egovframework/mapper/let/cmm/use/EgovCmmUse_SQL_cubrid.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 25 | 26 | 41 | 42 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /src/main/resources/egovframework/mapper/let/cmm/use/EgovCmmUse_SQL_hsql.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 25 | 26 | 41 | 42 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /src/main/resources/egovframework/mapper/let/cmm/use/EgovCmmUse_SQL_mysql.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 25 | 26 | 41 | 42 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /src/main/resources/egovframework/mapper/let/cmm/use/EgovCmmUse_SQL_oracle.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 25 | 26 | 41 | 42 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /src/main/resources/egovframework/mapper/let/cmm/use/EgovCmmUse_SQL_tibero.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 25 | 26 | 41 | 42 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /src/main/resources/egovframework/mapper/let/uat/esm/EgovSiteMgr_SQL_altibase.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | UPDATE LETTNEMPLYRINFO 9 | SET password = #{new_password} 10 | WHERE emplyr_id = #{login_id} AND password = #{old_password} 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/resources/egovframework/mapper/let/uat/esm/EgovSiteMgr_SQL_cubrid.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | UPDATE LETTNEMPLYRINFO 9 | SET password = #{new_password} 10 | WHERE emplyr_id = #{login_id} AND password = #{old_password} 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/resources/egovframework/mapper/let/uat/esm/EgovSiteMgr_SQL_hsql.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | UPDATE LETTNEMPLYRINFO 9 | SET password = #{new_password} 10 | WHERE emplyr_id = #{login_id} AND password = #{old_password} 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/resources/egovframework/mapper/let/uat/esm/EgovSiteMgr_SQL_mysql.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | UPDATE LETTNEMPLYRINFO 9 | SET password = #{new_password} 10 | WHERE emplyr_id = #{login_id} AND password = #{old_password} 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/resources/egovframework/mapper/let/uat/esm/EgovSiteMgr_SQL_oracle.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | UPDATE LETTNEMPLYRINFO 9 | SET password = #{new_password} 10 | WHERE emplyr_id = #{login_id} AND password = #{old_password} 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/resources/egovframework/mapper/let/uat/esm/EgovSiteMgr_SQL_tibero.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | UPDATE LETTNEMPLYRINFO 9 | SET password = #{new_password} 10 | WHERE emplyr_id = #{login_id} AND password = #{old_password} 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/resources/egovframework/validator/let/cop/bbs/EgovBdMstrRegist.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 |
    10 | 11 | 12 | 13 | 14 | maxlength 15 | 120 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | maxlength 24 | 2000 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 |
    47 |
    48 | 49 |
    -------------------------------------------------------------------------------- /src/main/resources/egovframework/validator/let/cop/bbs/EgovNoticeRegist.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 |
    10 | 11 | 12 | 13 | 14 | maxlength 15 | 1200 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 |
    34 |
    35 | 36 |
    -------------------------------------------------------------------------------- /src/main/resources/egovframework/validator/let/cop/com/EgovCopComManage.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 |
    9 | 10 | 11 | 12 | 13 | maxlength 14 | 120 15 | 16 | 17 | 18 | 19 | 20 | 21 | maxlength 22 | 2000 23 | 24 | 25 | 26 | 27 | 28 |
    29 |
    30 | 31 | 32 | 33 | 34 | 35 | 36 |
    37 |
    38 | 39 |
    -------------------------------------------------------------------------------- /src/main/resources/egovframework/validator/let/cop/smt/sim/EgovIndvdlSchdulManage.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 |
    10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | maxlength 26 | 255 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | maxlength 35 | 2500 36 | 37 | 38 | 39 | 61 | 62 | 63 | 64 | 65 |
    66 |
    67 | 68 |
    -------------------------------------------------------------------------------- /src/main/resources/logback-spring.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 23 | 24 | 25 | 26 | 28 | 29 | 30 | [%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} : %30logger{5} - %msg%n 31 | 32 | 33 | 34 | 35 | 36 | 38 | 39 | ${LOG_PATH}/${LOG_FILE_NAME}.log 40 | 41 | 42 | 44 | ${LOG_PATTERN} 45 | 46 | 47 | 48 | 50 | 51 | ${LOG_PATH}/${LOG_FILE_NAME}.%d{yyyy-MM-dd}_%i.log 52 | 53 | 55 | 56 | ${LOG_MAX_FILE_SIZE} 57 | 58 | 59 | ${LOG_MAX_HISTORY} 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /src/main/resources/static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 표준프레임워크 경량환경 홈페이지 템플릿 5 | 6 | 7 | 8 |

    경량환경 홈페이지 템플릿 구동 성공

    9 |

    10 | egovframe-template-simple-react을 구동하세요 11 |

    12 |

    13 | application.properties에 정의되어 있는 암호화서비스 알고리즘 키(Globals.crypto.algoritm) 및
    JWT secret 키(Globals.jwt.secret) 값을 반드시 기본값에서 변경하여 사용하시기 바랍니다 14 |

    15 |

    16 | 기타 자세한 사항은 README.md 참고 17 |

    18 | 19 | -------------------------------------------------------------------------------- /src/test/java/egovframework/com/EgovMessageSourceTest.java: -------------------------------------------------------------------------------- 1 | package egovframework.com; 2 | 3 | import egovframework.com.cmm.EgovMessageSource; 4 | import egovframework.com.config.EgovConfigAppMsg; 5 | import org.assertj.core.api.Assertions; 6 | import org.junit.jupiter.api.DynamicTest; 7 | import org.junit.jupiter.api.Test; 8 | import org.junit.jupiter.api.TestFactory; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.boot.test.context.SpringBootTest; 11 | import java.util.Arrays; 12 | import java.util.List; 13 | import java.util.Locale; 14 | import java.util.stream.Stream; 15 | 16 | 17 | /** 18 | * fileName : EgovMessageSourceTest 19 | * author : crlee 20 | * date : 2023/05/05 21 | * description : 22 | * =========================================================== 23 | * DATE AUTHOR NOTE 24 | * ----------------------------------------------------------- 25 | * 2023/05/05 crlee 최초 생성 26 | */ 27 | @SpringBootTest(classes = {EgovConfigAppMsg.class}) 28 | public class EgovMessageSourceTest { 29 | 30 | @Autowired 31 | EgovMessageSource egovMessageSource; 32 | 33 | @TestFactory 34 | Stream messageTests() { 35 | List locales = Arrays.asList( 36 | Locale.KOREA, 37 | Locale.US 38 | ); 39 | 40 | return locales.stream().map(locale -> DynamicTest.dynamicTest( 41 | "Message test with " + locale.getDisplayName(), 42 | () -> { 43 | String msgType = "fail.common.login"; 44 | String expectedMessage = getMessageForLocale(locale); 45 | 46 | Assertions.assertThat( 47 | egovMessageSource.getMessage(msgType, locale) 48 | ).isEqualTo(expectedMessage); 49 | } 50 | )); 51 | } 52 | 53 | private String getMessageForLocale(Locale locale) { 54 | if (locale == Locale.KOREA) { 55 | return "로그인 정보가 올바르지 않습니다."; 56 | } else if (locale == Locale.US) { 57 | return "login information is not correct"; 58 | } else { 59 | return ""; 60 | } 61 | } 62 | 63 | @Test 64 | void enMessageTest(){ 65 | String msgType = "fail.common.login"; 66 | String expectedMessage = "login information is not correct"; 67 | Assertions.assertThat( egovMessageSource.getMessage(msgType, Locale.US) ).isEqualTo(expectedMessage); 68 | Assertions.assertThat( egovMessageSource.getMessage(msgType, Locale.UK) ).isEqualTo(expectedMessage); 69 | Assertions.assertThat( egovMessageSource.getMessage(msgType, Locale.ENGLISH) ).isEqualTo(expectedMessage); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/test/java/egovframework/com/ProfileTestDev.java: -------------------------------------------------------------------------------- 1 | package egovframework.com; 2 | 3 | import org.assertj.core.api.Assertions; 4 | import org.junit.jupiter.api.Test; 5 | import org.springframework.beans.factory.annotation.Value; 6 | import org.springframework.boot.test.context.SpringBootTest; 7 | import org.springframework.test.context.ActiveProfiles; 8 | 9 | /** 10 | * fileName : ProfileTestDev 11 | * author : crlee 12 | * date : 2023/04/28 13 | * description : 14 | * =========================================================== 15 | * DATE AUTHOR NOTE 16 | * ----------------------------------------------------------- 17 | * 2023/04/28 crlee 최초 생성 18 | */ 19 | @SpringBootTest 20 | @ActiveProfiles("dev") 21 | public class ProfileTestDev { 22 | 23 | @Value("${Globals.DbType}") 24 | String dbType; 25 | 26 | @Value("${Globals.OsType}") 27 | String osType; 28 | 29 | @Value("${logging.rollingpolicy.maxHistory}") 30 | String maxHistory; 31 | 32 | @Test 33 | void propertyTest() { 34 | Assertions.assertThat(dbType).isEqualTo("hsql"); 35 | Assertions.assertThat(osType).isEqualTo("WINDOWS"); 36 | Assertions.assertThat(maxHistory).isEqualTo("2"); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/test/java/egovframework/com/ProfileTestProd.java: -------------------------------------------------------------------------------- 1 | package egovframework.com; 2 | 3 | import org.assertj.core.api.Assertions; 4 | import org.junit.jupiter.api.Test; 5 | import org.springframework.beans.factory.annotation.Value; 6 | import org.springframework.boot.test.context.SpringBootTest; 7 | import org.springframework.test.context.ActiveProfiles; 8 | 9 | /** 10 | * fileName : ProfileTestProd 11 | * author : crlee 12 | * date : 2023/04/28 13 | * description : 14 | * =========================================================== 15 | * DATE AUTHOR NOTE 16 | * ----------------------------------------------------------- 17 | * 2023/04/28 crlee 최초 생성 18 | */ 19 | @SpringBootTest 20 | @ActiveProfiles("prod") 21 | public class ProfileTestProd { 22 | 23 | @Value("${Globals.DbType}") 24 | String dbType; 25 | 26 | @Value("${Globals.OsType}") 27 | String osType; 28 | 29 | @Value("${logging.rollingpolicy.maxHistory}") 30 | String maxHistory; 31 | @Test 32 | void propertyTest() { 33 | Assertions.assertThat(dbType).isEqualTo("hsql"); 34 | Assertions.assertThat(osType).isEqualTo("LINUX"); 35 | Assertions.assertThat(maxHistory).isEqualTo("90"); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/test/java/egovframework/com/jwt/EgovJwtTokenUtilTest.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.jwt; 2 | 3 | import egovframework.com.cmm.LoginVO; 4 | import org.junit.jupiter.api.DisplayName; 5 | import org.junit.jupiter.api.Test; 6 | import org.junit.jupiter.api.extension.ExtendWith; 7 | import org.mockito.junit.jupiter.MockitoExtension; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.boot.test.context.SpringBootTest; 10 | import org.springframework.test.annotation.DirtiesContext; 11 | 12 | import static org.junit.jupiter.api.Assertions.*; 13 | 14 | class EgovJwtTokenUtilTest { 15 | 16 | private final EgovJwtTokenUtil jwtTokenUtil = new EgovJwtTokenUtil(); 17 | 18 | @DisplayName("올바른 토큰을 입력했을 때, LoginVO 객체를 반환한다.") 19 | @Test 20 | void testValidTokenReturnsLoginVO() { 21 | // given 22 | LoginVO loginVO = new LoginVO(); 23 | loginVO.setId("testUser"); 24 | loginVO.setName("Test User"); 25 | loginVO.setUserSe("USER"); 26 | loginVO.setOrgnztId("testOrg"); 27 | loginVO.setUniqId("testUniqId"); 28 | loginVO.setGroupNm("ROLE_USER"); 29 | 30 | String token = jwtTokenUtil.generateToken(loginVO); 31 | 32 | // when 33 | LoginVO result = jwtTokenUtil.getLoginVOFromToken(token); 34 | 35 | // then 36 | assertNotNull(result); 37 | assertEquals("testUser", result.getId()); 38 | assertEquals("Test User", result.getName()); 39 | assertEquals("USER", result.getUserSe()); 40 | assertEquals("testOrg", result.getOrgnztId()); 41 | assertEquals("testUniqId", result.getUniqId()); 42 | assertEquals("ROLE_USER", result.getGroupNm()); 43 | } 44 | 45 | @DisplayName("잘못된 토큰을 입력했을 때, InvalidJwtException 예외가 발생한다.") 46 | @Test 47 | void testInvalidTokenReturnsThrowException() { 48 | // given 49 | String token = "invalidToken"; 50 | 51 | // when 52 | // then 53 | assertThrows(InvalidJwtException.class, () -> { 54 | jwtTokenUtil.getLoginVOFromToken(token); 55 | }); 56 | } 57 | 58 | @DisplayName("Id가 포함되지 않은 토큰을 입력했을 때, InvalidJwtException 예외가 발생한다.") 59 | @Test 60 | void testTokenWithoutIdReturnsThrowException() { 61 | // given 62 | LoginVO loginVO = new LoginVO(); 63 | String token = jwtTokenUtil.generateToken(loginVO); 64 | 65 | // when 66 | // then 67 | assertThrows(InvalidJwtException.class, () -> { 68 | jwtTokenUtil.getLoginVOFromToken(token); 69 | }); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/test/java/egovframework/com/jwt/JwtAuthenticationFilterTest.java: -------------------------------------------------------------------------------- 1 | package egovframework.com.jwt; 2 | 3 | import egovframework.com.cmm.LoginVO; 4 | import org.junit.jupiter.api.BeforeEach; 5 | import org.junit.jupiter.api.DisplayName; 6 | import org.junit.jupiter.api.Test; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.boot.test.context.SpringBootTest; 9 | import org.springframework.boot.test.mock.mockito.MockBean; 10 | import org.springframework.mock.web.MockHttpServletRequest; 11 | import org.springframework.mock.web.MockHttpServletResponse; 12 | import org.springframework.security.core.context.SecurityContextHolder; 13 | 14 | import javax.servlet.FilterChain; 15 | 16 | import static org.junit.jupiter.api.Assertions.assertEquals; 17 | import static org.junit.jupiter.api.Assertions.assertNotNull; 18 | import static org.junit.jupiter.api.Assertions.assertNull; 19 | import static org.mockito.Mockito.mock; 20 | import static org.mockito.Mockito.when; 21 | 22 | @SpringBootTest 23 | public class JwtAuthenticationFilterTest { 24 | 25 | @Autowired 26 | private JwtAuthenticationFilter filter; 27 | 28 | @MockBean 29 | private EgovJwtTokenUtil jwtTokenUtil; 30 | 31 | private MockHttpServletRequest request; 32 | private MockHttpServletResponse response; 33 | private FilterChain filterChain; 34 | 35 | @BeforeEach 36 | public void setUp() { 37 | request = new MockHttpServletRequest(); 38 | response = new MockHttpServletResponse(); 39 | filterChain = mock(FilterChain.class); 40 | SecurityContextHolder.clearContext(); 41 | } 42 | 43 | @DisplayName("유효한 토큰이 주어지면 인증 객체가 설정된다") 44 | @Test 45 | public void testValidTokenSetsAuthentication() throws Exception { 46 | String fakeToken = "valid.jwt.token"; 47 | 48 | LoginVO loginVO = new LoginVO(); 49 | loginVO.setId("user1"); 50 | loginVO.setGroupNm("ROLE_ADMIN"); 51 | 52 | request.addHeader("Authorization", fakeToken); 53 | when(jwtTokenUtil.getLoginVOFromToken(fakeToken)).thenReturn(loginVO); 54 | 55 | filter.doFilterInternal(request, response, filterChain); 56 | 57 | assertNotNull(SecurityContextHolder.getContext().getAuthentication()); 58 | assertEquals("user1", ((LoginVO) SecurityContextHolder.getContext().getAuthentication().getPrincipal()).getId()); 59 | } 60 | 61 | @DisplayName("유효하지 않은 토큰이 주어지면 인증 객체가 설정되지 않는다") 62 | @Test 63 | public void testInvalidTokenDoesNotSetAuthentication() throws Exception { 64 | String invalidToken = "invalid.jwt.token"; 65 | request.addHeader("Authorization", invalidToken); 66 | 67 | when(jwtTokenUtil.getLoginVOFromToken(invalidToken)) 68 | .thenThrow(new InvalidJwtException("Invalid token")); 69 | 70 | filter.doFilterInternal(request, response, filterChain); 71 | 72 | assertNull(SecurityContextHolder.getContext().getAuthentication()); 73 | } 74 | } 75 | 76 | -------------------------------------------------------------------------------- /src/test/java/egovframework/let/cop/bbs/service/BoardTest.java: -------------------------------------------------------------------------------- 1 | package egovframework.let.cop.bbs.service; 2 | 3 | import org.junit.Test; 4 | 5 | import egovframework.let.cop.bbs.domain.model.Board; 6 | 7 | /** 8 | * fileName : BoardTest 9 | * author : crlee 10 | * date : 2023/04/26 11 | * description : 12 | * =========================================================== 13 | * DATE AUTHOR NOTE 14 | * ----------------------------------------------------------- 15 | * 2023/04/26 crlee 최초 생성 16 | */ 17 | 18 | public class BoardTest{ 19 | 20 | @Test 21 | public void Board() { 22 | Board board = new Board(); 23 | board.setBbsId("TestId"); 24 | board.setFrstRegisterId("FrstId"); 25 | board.setNttNo(3L); 26 | 27 | org.junit.Assert.assertEquals( board.getBbsId() , "TestId" ); 28 | org.junit.Assert.assertEquals( board.getFrstRegisterId() , "FrstId" ); 29 | org.junit.Assert.assertEquals( board.getNttNo() , 3L ); 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /src/test/java/egovframework/let/cop/bbs/service/BoardVOTest.java: -------------------------------------------------------------------------------- 1 | package egovframework.let.cop.bbs.service; 2 | 3 | import org.junit.Test; 4 | 5 | import egovframework.let.cop.bbs.domain.model.BoardVO; 6 | 7 | /** 8 | * fileName : BoardVOTest 9 | * author : crlee 10 | * date : 2023/04/26 11 | * description : 12 | * =========================================================== 13 | * DATE AUTHOR NOTE 14 | * ----------------------------------------------------------- 15 | * 2023/04/26 crlee 최초 생성 16 | */ 17 | 18 | public class BoardVOTest{ 19 | 20 | @Test 21 | public void BoardVo() { 22 | BoardVO boardVO = new BoardVO(); 23 | boardVO.setBbsId("TestId"); 24 | boardVO.setBbsNm("게시판nm"); 25 | boardVO.setFrstRegisterId("FrstId"); 26 | boardVO.setNttNo(3L); 27 | 28 | 29 | org.junit.Assert.assertEquals( boardVO.getBbsId() , "TestId" ); 30 | org.junit.Assert.assertEquals( boardVO.getFrstRegisterId() , "FrstId" ); 31 | org.junit.Assert.assertEquals( boardVO.getNttNo() , 3L ); 32 | org.junit.Assert.assertEquals( boardVO.getBbsNm() , "게시판nm" ); 33 | } 34 | } -------------------------------------------------------------------------------- /src/test/java/egovframework/let/cop/bbs/service/impl/BBSAttributeManageDAOTestInsertBBSMasterInfTest.java: -------------------------------------------------------------------------------- 1 | package egovframework.let.cop.bbs.service.impl; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertEquals; 4 | 5 | import java.time.LocalDateTime; 6 | import java.time.format.DateTimeFormatter; 7 | 8 | import org.egovframe.rte.fdl.idgnr.EgovIdGnrService; 9 | import org.junit.jupiter.api.Test; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.boot.test.context.SpringBootTest; 12 | 13 | import egovframework.let.cop.bbs.domain.model.BoardMaster; 14 | import egovframework.let.cop.bbs.domain.repository.BBSAttributeManageDAO; 15 | import lombok.RequiredArgsConstructor; 16 | import lombok.extern.slf4j.Slf4j; 17 | 18 | /** 19 | * [게시판생성관리][BBSAttributeManageDAO.insertBBSMasterInf] DAO 단위 테스트 20 | * 21 | * @author 이백행 22 | * @since 2024-09-20 23 | * 24 | */ 25 | @SpringBootTest 26 | @RequiredArgsConstructor 27 | @Slf4j 28 | class BBSAttributeManageDAOTestInsertBBSMasterInfTest { 29 | 30 | /** 31 | * 게시판 속성정보 관리를 위한 데이터 접근 클래스 32 | */ 33 | @Autowired 34 | private BBSAttributeManageDAO bbsAttributeManageDAO; 35 | 36 | /** 37 | * 38 | */ 39 | @Autowired 40 | private EgovIdGnrService egovBBSMstrIdGnrService; 41 | 42 | @Test 43 | void test() throws Exception { 44 | // given 45 | final BoardMaster boardMaster = new BoardMaster(); 46 | 47 | boardMaster.setBbsId(egovBBSMstrIdGnrService.getNextStringId()); 48 | 49 | final String now = LocalDateTime.now().format(DateTimeFormatter.ofPattern("uuuu-MM-dd'T'HH:mm:ss.SSSSSSSSS")); 50 | 51 | boardMaster.setBbsNm("test 이백행 게시판명 " + now); 52 | 53 | boardMaster.setPosblAtchFileSize("0"); 54 | 55 | final int expected = 1; 56 | 57 | // when 58 | final int result = bbsAttributeManageDAO.insertBBSMasterInf(boardMaster); 59 | 60 | // then 61 | if (log.isDebugEnabled()) { 62 | log.debug("result={}, {}", expected, result); 63 | } 64 | 65 | assertEquals(expected, result, "신규 게시판 속성정보를 등록한다."); 66 | } 67 | 68 | } -------------------------------------------------------------------------------- /src/test/java/egovframework/let/cop/bbs/service/impl/EgovBBSUseInfoManageServiceImplTestInsertBBSMastetInfTest.java: -------------------------------------------------------------------------------- 1 | package egovframework.let.cop.bbs.service.impl; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertEquals; 4 | 5 | import java.time.LocalDateTime; 6 | import java.time.format.DateTimeFormatter; 7 | 8 | import org.junit.jupiter.api.Test; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.boot.test.context.SpringBootTest; 11 | 12 | import egovframework.let.cop.bbs.domain.model.BoardMaster; 13 | import egovframework.let.cop.bbs.domain.model.BoardMasterVO; 14 | import egovframework.let.cop.bbs.dto.request.BbsInsertRequestDTO; 15 | import egovframework.let.cop.bbs.service.EgovBBSAttributeManageService; 16 | import lombok.RequiredArgsConstructor; 17 | import lombok.extern.slf4j.Slf4j; 18 | 19 | /** 20 | * [게시판생성관리][EgovBBSUseInfoManageServiceImpl.insertBBSMastetInf] ServiceImpl 단위 21 | * 테스트 22 | * 23 | * @author 이백행 24 | * @since 2024-09-20 25 | * 26 | */ 27 | @SpringBootTest 28 | @RequiredArgsConstructor 29 | @Slf4j 30 | class EgovBBSUseInfoManageServiceImplTestInsertBBSMastetInfTest { 31 | 32 | /** 33 | * 게시판 속성정보 관리를 위한 데이터 접근 클래스 34 | */ 35 | @Autowired 36 | private EgovBBSAttributeManageService egovBBSAttributeManageService; 37 | 38 | @Test 39 | void test() throws Exception { 40 | // given 41 | final String now = LocalDateTime.now().format(DateTimeFormatter.ofPattern("uuuu-MM-dd'T'HH:mm:ss.SSSSSSSSS")); 42 | 43 | final BbsInsertRequestDTO bbsInsertRequestDTO = new BbsInsertRequestDTO(); 44 | bbsInsertRequestDTO.setBbsNm("test 이백행 게시판명 " + now); 45 | bbsInsertRequestDTO.setPosblAtchFileSize("0"); 46 | bbsInsertRequestDTO.setBbsAttrbCode("BBSA02"); 47 | bbsInsertRequestDTO.setBbsTyCode("BBST01"); 48 | bbsInsertRequestDTO.setFileAtchPosblAt("Y"); 49 | bbsInsertRequestDTO.setUseAt("Y"); 50 | bbsInsertRequestDTO.setFrstRegisterId("admin"); 51 | 52 | // selectBBSMasterInf의 코드는 리액트 변경이 필요하여 리펙토링 보류 상태이므로 53 | // 테스트를 위해 임시로 BoardMaster를 사용합니다. 54 | final BoardMaster boardMaster = new BoardMaster(); 55 | boardMaster.setBbsNm("test 이백행 게시판명 " + now); 56 | boardMaster.setPosblAtchFileSize("0"); 57 | 58 | // when 59 | final String result = egovBBSAttributeManageService.insertBBSMastetInf(bbsInsertRequestDTO); 60 | boardMaster.setBbsId(result); 61 | 62 | // then 63 | final BoardMasterVO resultBoardMasterVO = egovBBSAttributeManageService.selectBBSMasterInf(boardMaster); 64 | 65 | if (log.isDebugEnabled()) { 66 | log.debug("result={}", result); 67 | log.debug("resultBoardMasterVO={}", resultBoardMasterVO); 68 | log.debug("getBbsId={}", resultBoardMasterVO.getBbsId()); 69 | } 70 | 71 | assertEquals(result, resultBoardMasterVO.getBbsId(), "신규 게시판 속성정보를 생성한다."); 72 | } 73 | 74 | } -------------------------------------------------------------------------------- /src/test/java/egovframework/let/cop/bbs/web/EgovBBSAttributeManageApiControllerTestInsertBBSMasterInfTest.json: -------------------------------------------------------------------------------- 1 | { 2 | "resultCode": 200, 3 | "resultMessage": "성공했습니다.", 4 | "result": { 5 | "resultCnt": "1", 6 | "paginationInfo": { 7 | "currentPageNo": 1, 8 | "recordCountPerPage": 10, 9 | "pageSize": 10, 10 | "totalRecordCount": 1, 11 | "totalPageCount": 1, 12 | "firstPageNoOnPageList": 1, 13 | "lastPageNoOnPageList": 1, 14 | "firstRecordIndex": 0, 15 | "lastRecordIndex": 10, 16 | "firstPageNo": 1, 17 | "lastPageNo": 1 18 | }, 19 | "resultList": [ 20 | { 21 | "bbsAttrbCode": " ", 22 | "bbsId": "BBSMSTR_000000000001", 23 | "bbsIntrcn": "", 24 | "bbsNm": "test 이백행 게시판명 2024-09-20T21:31:36.026000000", 25 | "bbsTyCode": " ", 26 | "fileAtchPosblAt": "", 27 | "frstRegisterId": "", 28 | "frstRegisterPnttm": "2024-09-20", 29 | "lastUpdusrId": "", 30 | "lastUpdusrPnttm": "", 31 | "posblAtchFileNumber": 0, 32 | "posblAtchFileSize": "", 33 | "replyPosblAt": "", 34 | "tmplatId": " ", 35 | "useAt": " ", 36 | "bbsUseFlag": "", 37 | "trgetId": "", 38 | "registSeCode": "", 39 | "uniqId": "", 40 | "tmplatNm": "", 41 | "option": "", 42 | "commentAt": "", 43 | "stsfdgAt": "", 44 | "searchBgnDe": "", 45 | "searchCnd": "", 46 | "searchEndDe": "", 47 | "searchWrd": "", 48 | "sortOrdr": "", 49 | "searchUseYn": "", 50 | "pageIndex": 1, 51 | "pageUnit": 10, 52 | "pageSize": 10, 53 | "firstIndex": 1, 54 | "lastIndex": 1, 55 | "recordCountPerPage": 10, 56 | "rowNo": 0, 57 | "frstRegisterNm": "", 58 | "bbsTyCodeNm": "", 59 | "bbsAttrbCodeNm": "", 60 | "lastUpdusrNm": "", 61 | "authFlag": "" 62 | } 63 | ] 64 | } 65 | } -------------------------------------------------------------------------------- /src/test/java/egovframework/let/uat/uia/web/TestEgovLoginApiControllerSelenium.java: -------------------------------------------------------------------------------- 1 | package egovframework.let.uat.uia.web; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertEquals; 4 | import static org.junit.jupiter.api.Assertions.fail; 5 | 6 | import org.junit.jupiter.api.BeforeEach; 7 | import org.junit.jupiter.api.Test; 8 | import org.openqa.selenium.By; 9 | import org.openqa.selenium.WebDriver; 10 | import org.openqa.selenium.WebElement; 11 | import org.openqa.selenium.chrome.ChromeDriver; 12 | 13 | import lombok.extern.slf4j.Slf4j; 14 | 15 | @Slf4j 16 | class TestEgovLoginApiControllerSelenium { 17 | 18 | WebDriver driver; 19 | 20 | @BeforeEach 21 | public void setup() { 22 | driver = new ChromeDriver(); 23 | } 24 | 25 | @Test 26 | void test() { 27 | if (log.isDebugEnabled()) { 28 | log.debug("[2024년 전자정부 표준프레임워크 컨트리뷰션][로그인] 셀레늄 단위 테스트"); 29 | } 30 | 31 | // given 32 | if (log.isDebugEnabled()) { 33 | log.debug("로그인 화면 이동"); 34 | } 35 | driver.get("http://localhost:3000/login"); 36 | 37 | // 아이디 입력 38 | sleep(); 39 | WebElement idWebElement = driver.findElement(By.cssSelector( 40 | "#contents > div > div.login_box > form > fieldset > span > input[type=text]:nth-child(1)")); 41 | idWebElement.sendKeys("admin"); 42 | 43 | // 비밀번호 입력 44 | sleep(); 45 | WebElement passwordWebElement = driver.findElement(By.cssSelector( 46 | "#contents > div > div.login_box > form > fieldset > span > input[type=password]:nth-child(2)")); 47 | passwordWebElement.sendKeys("1"); 48 | 49 | // when 50 | // 로그인 버튼 클릭 51 | sleep(); 52 | WebElement loginWebElement = driver 53 | .findElement(By.cssSelector("#contents > div > div.login_box > form > fieldset > button > span")); 54 | loginWebElement.click(); 55 | 56 | // then 57 | sleep(); 58 | WebElement spanWebElement = driver 59 | .findElement(By.cssSelector("#root > div > div.header > div.inner > div.user_info > span")); 60 | assertEquals("관리자", spanWebElement.getText(), "로그인 실패"); 61 | } 62 | 63 | private void sleep() { 64 | try { 65 | Thread.sleep(3000); 66 | } catch (InterruptedException e) { 67 | fail("InterruptedException: Thread.sleep"); 68 | } 69 | } 70 | 71 | } -------------------------------------------------------------------------------- /src/test/java/egovframework/study/jpa/domain/Locker.java: -------------------------------------------------------------------------------- 1 | package egovframework.study.jpa.domain; 2 | 3 | import lombok.*; 4 | 5 | import javax.persistence.CascadeType; 6 | import javax.persistence.Entity; 7 | import javax.persistence.Id; 8 | import javax.persistence.OneToOne; 9 | 10 | /** 11 | * fileName : Locker 12 | * author : crlee 13 | * date : 2023/04/28 14 | * description : 15 | * =========================================================== 16 | * DATE AUTHOR NOTE 17 | * ----------------------------------------------------------- 18 | * 2023/04/28 crlee 최초 생성 19 | */ 20 | @Getter 21 | @Setter 22 | @NoArgsConstructor 23 | @AllArgsConstructor 24 | @Builder 25 | @ToString 26 | @Entity 27 | public class Locker { 28 | @Id 29 | private Long id; 30 | 31 | private String name; 32 | 33 | @Builder.Default 34 | @OneToOne(mappedBy = "locker" , cascade = CascadeType.PERSIST) 35 | private Member member = new Member(); 36 | } -------------------------------------------------------------------------------- /src/test/java/egovframework/study/jpa/domain/Member.java: -------------------------------------------------------------------------------- 1 | package egovframework.study.jpa.domain; 2 | 3 | import lombok.*; 4 | 5 | import javax.persistence.*; 6 | 7 | /** 8 | * fileName : Member 9 | * author : crlee 10 | * date : 2023/04/28 11 | * description : 12 | * =========================================================== 13 | * DATE AUTHOR NOTE 14 | * ----------------------------------------------------------- 15 | * 2023/04/28 crlee 최초 생성 16 | */ 17 | @Getter 18 | @Setter 19 | @NoArgsConstructor 20 | @AllArgsConstructor 21 | @Builder 22 | @ToString(exclude = { "team" , "locker"}) 23 | @Entity 24 | public class Member { 25 | @Id 26 | private String id; 27 | 28 | private String username; 29 | 30 | private int age; 31 | @ManyToOne(fetch = FetchType.LAZY) 32 | @JoinColumn(name="TEAM_ID") 33 | private Team team; 34 | 35 | @OneToOne(fetch = FetchType.LAZY) 36 | @JoinColumn(name="LOCKER_ID") 37 | private Locker locker; 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/test/java/egovframework/study/jpa/domain/Team.java: -------------------------------------------------------------------------------- 1 | package egovframework.study.jpa.domain; 2 | 3 | import lombok.*; 4 | 5 | import javax.persistence.Entity; 6 | import javax.persistence.Id; 7 | import javax.persistence.OneToMany; 8 | import java.util.ArrayList; 9 | import java.util.List; 10 | 11 | /** 12 | * fileName : Team 13 | * author : crlee 14 | * date : 2023/04/28 15 | * description : 16 | * =========================================================== 17 | * DATE AUTHOR NOTE 18 | * ----------------------------------------------------------- 19 | * 2023/04/28 crlee 최초 생성 20 | */ 21 | 22 | @Getter 23 | @Setter 24 | @NoArgsConstructor 25 | @AllArgsConstructor 26 | @Builder 27 | @ToString 28 | @Entity 29 | public class Team { 30 | @Id 31 | private String id; 32 | 33 | private String name; 34 | @Builder.Default 35 | @OneToMany(mappedBy = "team") 36 | private List members = new ArrayList(); 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/test/resources/logback-spring.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 17 | 18 | 20 | 21 | 22 | 25 | 26 | 27 | 28 | 30 | 31 | 32 | [%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} : %30logger{5} - 33 | %msg%n 34 | 35 | 36 | 37 | 38 | 39 | 41 | 42 | ${LOG_PATH}/${LOG_FILE_NAME}.log 43 | 44 | 45 | 47 | ${LOG_PATTERN} 48 | 49 | 50 | 51 | 53 | 54 | ${LOG_PATH}/${LOG_FILE_NAME}.%d{yyyy-MM-dd}_%i.log 55 | 56 | 58 | 59 | ${LOG_MAX_FILE_SIZE} 60 | 61 | 62 | ${LOG_MAX_HISTORY} 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | --------------------------------------------------------------------------------