The first request works, but on the second it gives 404, path not found What can it be done with?
@PostMapping(value = "/postsViews", consumes = "application/json", produces = "application/json")
public Integer generateViews(@RequestBody PostViewsDTO requestDTO) throws IOException, JRException {
viewsService.generate(requestDTO.getFileName(), requestDTO.getProjectId());
return HttpServletResponse.SC_OK;
}
@PostMapping(value = "/favorite", consumes = "application/json", produces = "application/json")
public Integer generateFavorite(@RequestBody FavoriteDTO requestDTO) throws IOException, JRException {
favoriteService.generate(requestDTO);
return HttpServletResponse.SC_OK;
}
CodePudding user response:
The problem is solved, gitlab uploaded not the last commit to the server
CodePudding user response:
There's only two things that I can think of.
First, to make sure that you are running the code that you think you are, try shutting the app down, then "clean" the project, build and run it again.
If that doesn't work, it might be a mismatch between the data that you are posting and the definition of FavoriteDTO. Try commenting out the parameter and the line of code that uses it.