각종 시스템 설정관련 기능 모음 클래스 추가
This commit is contained in:
parent
5c2a4b1174
commit
98ce35ca8c
66
src/main/java/nlib/cmm/web/SystemController.java
Normal file
66
src/main/java/nlib/cmm/web/SystemController.java
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
package nlib.cmm.web;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.security.core.Authentication;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import nlib.cmm.service.NlibProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* @Class Name : SystemController.java
|
||||||
|
*
|
||||||
|
* @Description : 각종 시스템 설정관련 기능 모음 클래스
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* @ ------------ -------- ---------------------------
|
||||||
|
* @ 수정일 수정자 수정내용
|
||||||
|
* @ ------------ -------- ---------------------------
|
||||||
|
* @ 2021. 7. 16. KNKIM 최초 생성
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author 이씨플라자 * DIGITALSHIP KNKIM
|
||||||
|
* @since 2021. 7. 16.
|
||||||
|
* @version 1.0
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
public class SystemController {
|
||||||
|
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(SystemController.class);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* NLIB 프로퍼티 서비스
|
||||||
|
*/
|
||||||
|
@Resource(name="nlibProperty")
|
||||||
|
NlibProperty nlibProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* NLIB Property 재로드 작업을 요청한다.
|
||||||
|
*
|
||||||
|
* @param authentication
|
||||||
|
* @param model
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping( {"/system/reloadProperties.do"} )
|
||||||
|
public String reloadProperties(Authentication authentication, ModelMap model) {
|
||||||
|
|
||||||
|
// TODO : 시스템관리자인지 권한 체크할 것
|
||||||
|
int propCount = nlibProperty.loadProperties();
|
||||||
|
|
||||||
|
model.addAttribute("code", String.format("프로퍼티 건수(결과) : %d", propCount));
|
||||||
|
model.addAttribute("message", "NLIB Property 재로드 작업을 호출했습니다. 로그에서 처리결과를 확인하시기 바랍니다.");
|
||||||
|
|
||||||
|
return "nlib/cmm/common";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user