here is the successful code. I can"t find a more concise way. It is said that this method is not good for mobile phone support
const data = new URLSearchParams();
data.append("beUserId", userId);
axios.post("/user/attention", data)
.then(response => {
console.log(response.data)
})
background JAVA code:
@PostMapping("/attention")
@ResponseBody
public String attention(Integer beUserId) {
System.out.println(beUserId);
return "";
}