java - Spring Data REST: How to retrieve many items using list of Ids in one single call? -


i can retrieve 1 single book spring data rest call such as: /book/{id}

now, if know ids of 2 books , want retrieve them @ once? should call be? tried following returning me different books specified ones:

get /book?ids=id1,id2 

you declare query method in repository interface this:

list<book> findbyidin(@param("ids") long[] ids); 

so can request books way:

get /book/search/findbyidin?ids=1,6,9 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -