From cc6964a332be842b9ad9335d57e88064b42b7b53 Mon Sep 17 00:00:00 2001 From: Rachel Walker Date: Mon, 3 Dec 2012 16:55:41 -0800 Subject: [PATCH] Annotation now only supported on class level --- .../raychatter/common/annotation/ExceptionHandler.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/exception-handler/src/main/java/com/raychatter/common/annotation/ExceptionHandler.java b/exception-handler/src/main/java/com/raychatter/common/annotation/ExceptionHandler.java index 9e7dda9..0602a00 100644 --- a/exception-handler/src/main/java/com/raychatter/common/annotation/ExceptionHandler.java +++ b/exception-handler/src/main/java/com/raychatter/common/annotation/ExceptionHandler.java @@ -9,14 +9,7 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) -@Target({ - ElementType.ANNOTATION_TYPE, - ElementType.CONSTRUCTOR, - ElementType.FIELD, - ElementType.LOCAL_VARIABLE, - ElementType.METHOD, - ElementType.PARAMETER, - ElementType.TYPE}) +@Target(ElementType.TYPE) public @interface ExceptionHandler { HttpStatus httpStatus() default HttpStatus.INTERNAL_SERVER_ERROR; String contentType() default MediaType.APPLICATION_XML_VALUE;