이호영 이호영 2024-11-28
+test ajax
@768468dd3a698e9f1c6d449d6a3d684329a7c7f5
src/main/java/itn/let/mjo/test/web/TestController.java
--- src/main/java/itn/let/mjo/test/web/TestController.java
+++ src/main/java/itn/let/mjo/test/web/TestController.java
@@ -47,6 +47,7 @@
 import org.springframework.web.bind.annotation.ModelAttribute;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.client.RestTemplate;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
@@ -3380,5 +3381,24 @@
 		}
 		
 	}
+	
+	@RequestMapping(value = "/web/mjon/test/ajaxTest.do")
+	public ResponseEntity<StatusResponse> ajaxTest(
+		@RequestParam String isSuccess,
+		@RequestParam String s_msg,
+		@RequestParam String f_msg,
+		HttpServletRequest request,
+		ModelMap model) throws Exception {
+		
+		if("Y".equals(isSuccess)) {
+			return ResponseEntity.ok().body(new StatusResponse(HttpStatus.OK, s_msg, ""));
+			
+		}else {
+			return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, f_msg, ""));
+			
+		}
+		
+	}
+	
 
 }
src/main/webapp/WEB-INF/jsp/web/msgdata/MsgDataView.jsp
--- src/main/webapp/WEB-INF/jsp/web/msgdata/MsgDataView.jsp
+++ src/main/webapp/WEB-INF/jsp/web/msgdata/MsgDataView.jsp
@@ -1043,6 +1043,9 @@
 	return confCheck;
 }
 
+
+
+
 //문자발송 처리 함수
 function fn_sendMsgData(){
 	
@@ -1233,6 +1236,10 @@
 }
 
 
+
+
+
+
 function sendMsgAjax_advc(){
     // 타블레이터 호출
     var $selectedData = tableL.getData(); // 데이터 가져오기
Add a comment
List