728x90
1. 파일등록 input type = file에 multiple 옵션시 다중 업로드
extend type Query {
testQuery(
input1: String = null
input2: String!
input3: [String]!
): testCollection! @hasServerRole(role: SERVER_USER)
}
2. graphQl에서 배열은 [String]으로
3. vo에서 int대신 Integer를 쓰자. int는 ajax등의 요청할 때 null 값을 못받는다.
4. 폼태그 입력시
$.ajax({
"type":"POST",
"url":"특정url",
"data":"queryData",
:{
"특정헤더":"특정헤더"
},
"success":"function(response",
"jqXHR)"{
"alert(""Success!"");"
},
"error":"function(response",
"jqXHR)"{
"alert(""Error!"");"
}
})
다음과 같이 보내면 ModelAttribute를 사용 가능,
contentType: 'application/json'을 유지하고 data : JSON.stringify(queryData) 사용할 경우
RequestBody를 사용해야한다.
-> ModelAttribute는 form 데이터만 가능하기 때문.
5. 최신 데이터를 쿼리로 받아올때
DATE를 기준으로 ORDER BY DESC를 해도 되지만
GROUP BY를 사용해서 MAX 값으로 가져와도 된다
'개인학습용' 카테고리의 다른 글
| [Git]이클립스 Git Author, Committer 이메일 수정하기 (0) | 2024.12.19 |
|---|---|
| [IfcOpenShell]IfcOpenShell을 이용한 Clash Detetction(충돌 감지) (0) | 2024.12.11 |
| [Error] PSSecurityException, UnauthorizedAccess (0) | 2024.09.04 |
| 자바스크립트 new Date()로 한국 시간(now) 구하기 (0) | 2024.05.08 |
| Vscode Extension 저장용 (0) | 2024.04.08 |