The way you send them from the frontend, they are considered path parameters not query parameters. Configure your backend in the same way
@RequestMapping(value = "/checkData/{username}/{password}", method = RequestMethod.POST)
public String Authentication(@PathParam("username") String username, @PathParam("password") String password) {
}
In case that you want to work with your existing code and you don't want to change your backend, then you must adjust your frontend. As your backend is right now it expects query parameters in the url, so you need to send those in the frontend
checkLogin(userInfo : AuthLoginInfo){
return this.http.post(`${API_URL}/APP/checkData?username=${userInfo.username}&
password=${userInfo.password}`,{},{responseType: 'text'})
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…