I want to pass a list of objects in my request through @RequestParam but it doesn't work.
If I do :
 public List<Affaire> getAllAffaires(
                 @RequestParam(value = "consultantId", required = false) Long consultantId,
                 @RequestParam(value = "filtres", required = false) List<FilterDTO> filtres)
It doesnt go into the method, I get a 500 Error.
If I do :
 public List<Affaire> getAllAffaires(
                 @RequestParam(value = "consultantId", required = false) Long consultantId,
                 List<FilterDTO> filtres)
I am getting a :
Unable to evaluate the expression Method threw 'java.lang.IllegalArgumentException' exception.
If I pass another object which contains the list as :
 public List<Affaire> getAllAffaires(
                 @RequestParam(value = "consultantId", required = false) Long consultantId,
                 FilterDTOList filtres)
I get into the method but the property listFiltre of FilterDTOList is always null.
In Front Side (AngularJS) the call is :
function Affaire ($resource, DateUtils) {
        var resourceUrl =  'api/affaires/:id';
        return $resource(resourceUrl, {}, {
            'query': { method: 'GET', isArray: true,
                params:{
                    consultantId:'@consultantId',
                    filtres:'@filtres'
                },
How can I do pass my List as a parameter of my request?
 
     
    