반응형
import org.springframework.beans.propertyeditors.CustomCollectionEditor;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class className {
@InitBinder
public void initBinder(WebDataBinder binder) {
/* get method : request param list data ',' 처리 */
binder.registerCustomEditor(List.class, new CustomCollectionEditor(List.class));
}
}
반응형
'skill > Java.Kotlin' 카테고리의 다른 글
springboot @Scheduler 다중 서버에서 한번만 실행 : shedlock (1) | 2023.11.21 |
---|---|
[springboot] yml 과 Properties 설정 (1) | 2023.11.21 |
[Swawgger] GetMapping @RequestBody Error (0) | 2023.08.24 |
Json Data 시, 응답에 특정 데이터 제외 처리 (0) | 2023.08.07 |
[Error] ClassNotFoundException: org.apache.http.impl.client.HttpClients (0) | 2023.02.22 |