Q:

spring controller could not retrive a data from $http angular

I have a $http function in angular and a controller, but the controller do not retrieve data send from angular, in the log print 

Skip CORS processing: response already contains
  "Access-Control-Allow-Origin" header

I have configurate my filter in web.xml file to the headers 
response.setHeader("Access-Control-Allow-Origin", "*");
response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE");
response.setHeader("Access-Control-Max-Age", "3600");
response.setHeader("Access-Control-Allow-Headers", "Content-Type, x-requested-with");

my angular function is this 
     app.controller('LoadCardController', function($scope, $http) {

    $scope.executor = function() {

        var person = {
            name : 'Prueba',
            todayDate : 1469679969827
        };

        console.log("DATA=> ", data);

        $http({
            method : 'POST',
            url : 'http://localhost/myWeb/addPerson',
            data : person,
            headers : {
                'Content-Type' : 'application/json'
            }
        }).then(function successCallback(response) {
            console.log("success");
            console.log(response);
        }, function errorCallback(response) {
            console.log("error");
            console.log(response);

        });
    }

});

and my controller is this...
@ResponseBody
            @RequestMapping(path = "/addPerson", method = RequestMethod.POST)
            public Person addPerson(final Person person) throws CustomException {

                person.setAge("18");
                person.setBithDay("15");

                LOGGER.trace("Add person with data {}", person);

                return person;

            }

            });
        }

when come in controller, data of person is null, for name and todayDate attributes, that is send by me in angular.
my controller is very simple now, because only return the same person objet

A:

From what you've shown here, it seems like the request is going through, but the data isn't making it onto your person parameter in the Spring controller method. There could be a few different causes.
First, It could be that the request body isn't getting mapped to your Spring controller method's person parameter. You can tell Spring to do this automatically by using the @RequestBody annotation (details here) before the method parameter. In your example:
@ResponseBody
@RequestMapping(path = "/addPerson", method = RequestMethod.POST)
public Person addPerson(@RequestBody Person person) throws CustomException {

    person.setAge("18");
    person.setBithDay("15");

    LOGGER.trace("Add person with data {}", person);

    return person;

}

If that doesn't solve it, it could be a problem with the Person class. At the minimum, it needs to have:
public class Person {
    private String name;
    private String age;
    private String bithday;
    private Date todayDate;

    public Person() {
        // this depends how your serialization is set up
    }

    // getters and setters...
}

One convention is to use a separate data-transfer-object class (i.e. PersonDto), which takes the data from the request body and builds a Person object with it (and vice versa), so that you can control how the submission gets mapped to the backend. More info on that pattern here.

