JQuery 5

[SpringBoot] ajax 에서 사용하는 속성 살펴보기!

# ajax - settings example code Spring Boot Thymeleaf(html) 에서 jQuery Ajax settings option코드 예시 # 환경 /** * tool: STS 4.13.0 * version: 2.7.3-SNAPSHOT * java: 1.8 * type: MAVEN * view: THYMELEAF * jQuery: 3.6.0 */ # jQuery Load # ajax example code // Ajax Send function send(url, method, input, isAsync, type, cbSuccess, cbError, cbComplate) { const ajaxObj = $.ajax(url, // #1. settings { method : m..

자바스크립트 2022.08.21

[SpringBoot] ajax - multipart/form-data 로 요청하기!

# ajax - multipart/form-data jQuery ajax 의 contentType이 multipart/form-data 일 때, FormData 와 MultipartFile 를 이용하여 file 데이터 맵핑하기! # 환경 /** * tool: STS 4.13.0 * version: 2.7.3-SNAPSHOT * java: 1.8 * type: MAVEN * view: THYMELEAF * jQuery: 3.6.0 */ # page # html (일부분 발췌) 파일 테스트 페이지 입니다. file one file list # function (일부분 발췌) $(document).ready(function() { $('#formFileOne').on('submit', function(even..

스프링 부트 2022.08.14

[SpringBoot] ajax - html form tag 로 요청하기!

# jQuery Ajax(form tag) Spring Boot html form tag 를 이용하여 ajax 통신하기! # 환경 /** * tool: STS 4.13.0 * version: 2.7.3-SNAPSHOT * java: 1.8 * type: MAVEN * view: THYMELEAF * jQuery: 3.6.0 */ # page # html (일부분 발췌) form element submit # function (일부분 발췌) const test = { form: function(type) { sendForm(`/test/send/${type}`, $('#formSend'), function(result) { console.log(result.text); console.log(result.h..

스프링 부트 2022.08.13

[SpringBoot] ajax - application/json 로 요청하기!

# ajax - application/json jQuery ajax 의 contentType이 application/json; charset=utf-8 일 때, @ResponseBody로 파라미터 매핑하기 # 환경 /** * tool: STS 4.13.0 * version: 2.7.3-SNAPSHOT * java: 1.8 * type: MAVEN * view: THYMELEAF * jQuery: 3.6.0 */ # page # html (일부분 발췌) jsonView, ResponseBody (application/json) # function (일부분 발췌) const test = { json: function(type) { const value = $('#json').val(); if(value) {..

스프링 부트 2022.08.13

[SpringBoot] ajax - application/x-www-form-urlencoded 로 요청하기!

# ajax - application/x-www-form-urlencoded jQuery ajax 의 contentType이 (default) application/x-www-form-urlencoded; charset=utf-8 일 때, @RequestParam, @ModelAttribute 로 파라미터 매핑하기. # 환경 /** * tool: STS 4.13.0 * version: 2.7.3-SNAPSHOT * java: 1.8 * type: MAVEN * view: THYMELEAF * jQuery: 3.6.0 */ # page # html (일부분 발췌) 통신 테스트 페이지 입니다. GET, POST (application/x-www-form-urlencoded) # function (일부분 발췌..

스프링 부트 2022.08.13