From c0836d514fca41382b2e1b22ebd219d7dd599fd4 Mon Sep 17 00:00:00 2001 From: oppofind <836575280@qq.com> Date: Thu, 19 Sep 2019 11:00:48 +0800 Subject: [PATCH] optimized code --- .../doc/constants/AnnotationConstants.java | 18 ++++++++++++++++++ .../power/doc/constants/GlobalConstants.java | 18 +++++++++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/power/doc/constants/AnnotationConstants.java diff --git a/src/main/java/com/power/doc/constants/AnnotationConstants.java b/src/main/java/com/power/doc/constants/AnnotationConstants.java new file mode 100644 index 0000000..6fe338a --- /dev/null +++ b/src/main/java/com/power/doc/constants/AnnotationConstants.java @@ -0,0 +1,18 @@ +package com.power.doc.constants; + +/** + * java注解 + * @author yu 2019/9/19. + */ +public class AnnotationConstants { + + public static final String SHORT_CONTROLLER = "Controller"; + + public static final String SHORT_REST_CONTROLLER = "RestController"; + + public static final String SHORT_JSON_IGNORE= "Ignore"; + + public static final String SHORT_JSON_PROPERTY = "JsonProperty"; + + public static final String SHORT_JSON_FIELD = "JSONField"; +} diff --git a/src/main/java/com/power/doc/constants/GlobalConstants.java b/src/main/java/com/power/doc/constants/GlobalConstants.java index f269d62..52e309a 100644 --- a/src/main/java/com/power/doc/constants/GlobalConstants.java +++ b/src/main/java/com/power/doc/constants/GlobalConstants.java @@ -15,8 +15,24 @@ public class GlobalConstants { */ public static final String REST_CONTROLLER_FULLY = "org.springframework.web.bind.annotation.RestController"; + public static final String GET_MAPPING_FULLY = "org.springframework.web.bind.annotation.GetMapping"; + + public static final String POST_MAPPING_FULLY = "org.springframework.web.bind.annotation.PostMapping"; + + public static final String PUT_MAPPING_FULLY = "org.springframework.web.bind.annotation.PutMapping"; + + public static final String DELETE_MAPPING_FULLY = "org.springframework.web.bind.annotation.DeleteMapping"; + + public static final String REQUEST_MAPPING_FULLY = "org.springframework.web.bind.annotation.RequestMapping"; + + public static final String REQUEST_BODY_FULLY = "org.springframework.web.bind.annotation.RequestBody"; + + public static final String MODE_AND_VIEW_FULLY = "org.springframework.web.servlet.ModelAndView"; /** * java object类名 */ - public static final String JAVA_OBJECT = "java.lang.Object"; + public static final String JAVA_OBJECT_FULLY = "java.lang.Object"; + + + }