Organizational Research By

Surprising Reserch Topic

Experts Most Trusted Topic


angularjs spring boot put not supported with spring security


angularjs spring boot put not supported with spring security  using -'angularjs,spring-boot'

Angular controller function

$scope.updatePatient = function() {
            var patient = new patientUpdateService({id:"15", name:"m",lastname:"s"});
            patient.$update();
}


Angular service

.factory("patientUpdateService", function ($resource) {
    return $resource("/updatepatient", {id: "@id"}, {
        update: {
            method: 'PUT'
        }
    });
})


Spring boot controller

    @RequestMapping(value="/updatepatient/{id}", method=RequestMethod.PUT)
      @ResponseBody
      public Patients update(@PathVariable("id") int id, @RequestBody @Valid Patients patient) {
       return patientrep.save(patient);

}


I am making simple crud operation application using angularjs and springboot but i am getting following error :

in Angular :  PUT http://localhost:8080/updatepatient?id=15 405 (Method Not Allowed)

in Tomcat : o.s.web.servlet.PageNotFound             : Request method 'PUT' not supported

I am using CRUDRepository ; Get, POST , DELETE are working properly .
    

asked Oct 6, 2015 by tseetha
0 votes
18 views



Related Hot Questions



Government Jobs Opening


...