JavaのコントローラからJSにStringオブジェクトを渡した後に、コントローラにStringオブジェクトを渡すことはできるのでしょうか?
-- java
@ResponseBody
@GetMapping("/find_all_asc")
public List<Todo> find(){
List<Todo> todos = todoRepository.findAll(new Sort(Direction.ASC, "id"));
return todos;
}
-- js
$.getJSON(contextPath + "/find_all_asc", null,
function (data, textStatus, jqXHR) {
}
);
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。