Hey there, I'm facing a peculiar issue in my web development project. I have a table that acts as an input field where users can enter data and then send it back to the Spring Rest API. The data is received as a String and then parsed using the Gson library.
$http({
method: 'POST',
url: 'saveTableData.do',
headers: { 'Content-Type': 'application/json;'},
data:'tableVal'+data1
}) ;
Here is a snippet of my Spring controller:
@RequestMapping(value="/saveTableData",method=RequestMethod.POST)
public void saveTableDataToDb(@RequestBody String tableData) {
Gson gson = new Gson();
TableData dataFromJson = gson.fromJson(tableData, TableData.class);
}
Although the data is being sent successfully to the backend, I am seeing the following error message in the console: Failed to load resource: the server responded with a status of 404 (Not Found)
I am wondering why this error is occurring and if it will have any impact on the project in the future.