I looked at the other posts on SO and have not found the answer.
I created a Spring Boot application that currently only has 3 GET
web services.
I do not have any POST
methods.
When I run the application, the console warning keeps looping over and over.
o.s.web.servlet.PageNotFound : Request method 'POST' not supported
Is this something I need to be concerned about? Or is it only showing because I did not implement any POST
services?
Project Structure - Application.java Controller -> Manager/ManagerImpl -> DAO/DAOImpl.
When I make a call to the webservice, it is simply reading from a Oracle DB using JDBC and spitting them back out in JSON.
Controller Code -
@RestController
@RequestMapping(value = "/forms")
public class FormController {
@Autowired
private FormManager formManager;
@RequestMapping(value = "/{formId}", method = RequestMethod.GET)
public FormObj getFormForFormId(@PathVariable int formId) throws Exception {
FormObj forms = new FormObj();
try {
forms = formManager.getFormForFormId(formId);
} catch (Exception e){
throw new RemoteException("Error getting forms for formId- " + formId + " " + e.getMessage());
}
return forms;
}
@RequestMapping(method = RequestMethod.GET)
public List<FormObj> getFormsforUserId(@RequestParam(value="userId", defaultValue="0") int userId) throws Exception {
List<FormObj> forms = new ArrayList<>();
try {
forms = formManager.getFormForUserId(userId);
} catch (Exception e){
throw new RemoteException("Error getting forms for UserId- " + userId + " " + e.getMessage());
}
return forms;
}
@RequestMapping(value = "/time", method = RequestMethod.GET)
public long greeting(@RequestParam(value="name", defaultValue="World") String name) {
return Calendar.getInstance().getTimeInMillis();
}
}