你好,我是用春天开机,RESTful Web服务和angularjs,请求方法 '删除' 不支持angularsjs springboot
这是我restControlleur
@RestController
@RequestMapping("/structure")
public class StructureNotificationRestContolleur {
@Autowired
StructureNotificationService StructureNotif;
@Autowired
ChampService champService;
@RequestMapping(value = "/deleteChamp/{ch}", method=RequestMethod.DELETE)
public @ResponseBody void DeleteChamp(@PathVariable (value="ch") int ch)
{
champService.DeleteChamp(ch);
}
有按钮删除:
$scope.deleteST= function(ids)
{
$http.delete('/structure/deleteChamp/'+ids).
success(function(data) {
alert(ids);
});
}
,但有错误: osweb.servlet.PageNotFound:请求方法 '删除' 不支持
???
什么是“/ structure/deleteChamp /'+ ids'?它存在吗? – Pogrindis
/structure/deleteChamp /它是要删除的其余方法的路径,“ids”是要删除的元素的ID? –
我认为春季开机不知道方法'删除'???请求方法'DELETE'不支持 –