Modified README

This commit is contained in:
Rachel Walker
2012-12-04 14:58:44 -08:00
parent 4ee704713b
commit 7b4606e5a9

View File

@@ -4,10 +4,10 @@
## How to use spring-restful-exception-handler ## 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: 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:
`<?xml version="1.0" encoding="UTF-8"?>` ```<?xml version="1.0" encoding="UTF-8"?>
`<error>` <error>
`%s` %s
`</error>` </error>```
Annotate the custom exception class with `@Exception(*httpStatus*, *contentType*)`. Annotate the custom exception class with `@Exception(*httpStatus*, *contentType*)`.
The defaults are The defaults are