Now I have a class User, I get a request data of an array from the jsp or html.
array
jsp
html
list this Integer[] arr=[5,6,9,10,62,52,21]
Integer[] arr=[5,6,9,10,62,52,21]
if your repository interface extends CrudRepository, you can simply use deleteAll(List< User > entities). No such query is required.
get List< User > by using findAllById(ids)
deleteAll(List< User > entities)