1. 사용 기술
- 자바, mariadb, 스프링부트, 마이바티스, 메이븐
2. 구현된 기능
- 관리자 로그인, todo 입력 삭제 다음날로 미루기
3. 개선점
- with 구문으로 미루기 기능 구현하기 (클라이언트에서 내용 받아오지 말것)
- 로그기능, 로그인 기능 개선
- TODO 기능에 주간 계획 기능 포함하기
- TODO 기능 까지 구현하고 배포한 뒤에는 메타 관리 프로그램 구현, 서버 사용량 확인 페이지 구현
- 로깅 참고 소스코드
@AfterReturning(value = "postMapping()", returning = "returnValue")
public void logRequestBody(JoinPoint joinPoint, Object returnValue) throws NoSuchMethodException {
Method method = getMethod(joinPoint);
Annotation[][] parameterAnnotations = method.getParameterAnnotations();
Object[] args = joinPoint.getArgs();
for (int i = 0; i < args.length; i++) {
for (Annotation annotation : parameterAnnotations[i]) {
if (annotation instanceof RequestBody) {
logger.info("Method: {} - Request Body: {}", method.getName(), args[i]);
}
}
}
}
private Method getMethod(JoinPoint joinPoint) throws NoSuchMethodException {
String methodName = joinPoint.getSignature().getName();
Method[] methods = joinPoint.getTarget().getClass().getDeclaredMethods();
for (Method method : methods) {
if (method.getName().equals(methodName)) {
return method;
}
}
throw new NoSuchMethodException("Method not found: " + methodName);
}
'OLD' 카테고리의 다른 글
EASY ABAP - 10. FIELD SYMBOL(필드 심볼) (1) | 2024.06.05 |
---|---|
(작업중)Java의 Servlets과 Servlet Containers (1) | 2024.05.13 |
PP 공부 (0) | 2024.05.09 |
(Kept Updated) SAP&ABAP 공부하거나 정리할 것들 (1) | 2024.04.30 |
(작업중)EASY ABAP - 9-1. ABAP Dictionary (0) | 2024.04.24 |