I was wondering how to correctly implement a Spring Controller which is supposed to serve as a REST Service. Especially I want to try and make the interface as RESTful as po
If you want your whole Exception with stackTrace to be transmitted toward your client, as @Bart said you should send an "ErrorResource" object.
A library has it off-the-shelf :
com.github.zg2pro
spring-rest-basis
0.2
add it to your project and then just add a "@ControllerAdvice" class to your beans, as it is explained in the project wiki.
That should handle your errors nicely!