From dcb898951379650a5381f1e9764b175a935a0752 Mon Sep 17 00:00:00 2001 From: Rachel Walker Date: Wed, 5 Dec 2012 11:17:52 -0800 Subject: [PATCH] Modified README --- README.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index c34dbdc..13c4453 100644 --- a/README.md +++ b/README.md @@ -4,15 +4,11 @@ ## How to use spring-restful-exception-handler Under PROJECT/resources create a file called *error.template*. Inside this file, place the formatted error template you want to return when a custom exception is thrown. If no custom template is given, the following default template will be used: -``` - -%s -``` +``` %s ``` Annotate the custom exception class with `@Exception(*httpStatus*, *contentType*)`. -The defaults are -`httpStatus = HttpStatus.INTERNAL_SERVER_ERROR` -`contentType = MediaType.APPLICATION_XML_VALUE`. +The defaults are `httpStatus = HttpStatus.INTERNAL_SERVER_ERROR` and `contentType = MediaType.APPLICATION_XML_VALUE`. + The custom message is taken from the custom annotation class itself, so any parameters you'd like to insert need to be handled there. Make sure to add `com.raychatter.common.annotation.AnnotationHandler` as a bean in your XML.