Annotation now only supported on class level
This commit is contained in:
@@ -9,14 +9,7 @@ import java.lang.annotation.RetentionPolicy;
|
|||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Target({
|
@Target(ElementType.TYPE)
|
||||||
ElementType.ANNOTATION_TYPE,
|
|
||||||
ElementType.CONSTRUCTOR,
|
|
||||||
ElementType.FIELD,
|
|
||||||
ElementType.LOCAL_VARIABLE,
|
|
||||||
ElementType.METHOD,
|
|
||||||
ElementType.PARAMETER,
|
|
||||||
ElementType.TYPE})
|
|
||||||
public @interface ExceptionHandler {
|
public @interface ExceptionHandler {
|
||||||
HttpStatus httpStatus() default HttpStatus.INTERNAL_SERVER_ERROR;
|
HttpStatus httpStatus() default HttpStatus.INTERNAL_SERVER_ERROR;
|
||||||
String contentType() default MediaType.APPLICATION_XML_VALUE;
|
String contentType() default MediaType.APPLICATION_XML_VALUE;
|
||||||
|
|||||||
Reference in New Issue
Block a user