what's the best way to return an empty ResponseEntity with Spring?

Asl.har :

I'm wondering what would be the best return type for my controller if I return an empty ResponseEntity.
For example if I want to return a 204 - no content using ResponseEntity.noContent().build() should the return of my fonction be ResponseEntity<?>, ResponseEntity<Void> or just ResponseEntity

Radu Podea :
ResponseEntity<Void> with HttpStatus.NO_CONTENT

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=416601&siteId=1