My question is almost 1:1 as this one. The only difference (and struggle) I have is that my "data container" has a collection of objects. It looks like this:
public class A {
int plainFieldA;
B fieldB;
List<B> collectionB = new ArrayList<>();
}
public class B {
int plainFieldB;
}
@Transactional(readOnly = true)
@GetMapping("")
public Entity getAll(A reqParam) {
return getAll(reqParam);
}
Is it possible to define collectionB
in params of the url http://localhost/api/test?plainFieldA=1
without creating a converter ? @GameSalutes correctly pointed out that since spring 4
we can do fieldB.plainFieldB=2
so the url will be: http://localhost/api/test?plainFieldA=1&fieldB.plainFieldB=2
but the question is can we do soemthing similar with collectionB
without creating a converter ?