$.post({
url: "/register",
dataType: "json",
contentType: "application/json",
data: JSON.stringify(info),
success: function (data) {
}
});
It must contain:
dataType: "JSON",
contentType: "file application / JSON", 415 without an error occurs rear
spring boot code is as follows
@PostMapping("/register") @ResponseBody public String register(@RequestBody JSONObject info) { return null; }
Otherwise, you must add @RequestBody 500 errors