# Simplify-rest **Repository Path**: fanjr/simplify-rest ## Basic Information - **Project Name**: Simplify-rest - **Description**: 基于SpringMvc进行二次开发的一套注解工具包,自动暴露注解类的公有方法,旨在减少控制层的部分copy操作 - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 6 - **Forks**: 0 - **Created**: 2019-11-21 - **Last Updated**: 2023-06-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Simplify-rest #### What is this A set of annotation toolkit based on SpringMvc secondary development, which automatically exposes common methods of annotation classes, aims to reduce part of the control layer copy operation, can steal a bit lazy is a bit :-) ##### The main features 1. Easy to use, one annotation can solve the path that needs to be filled repeatedly when registering Mapping. 2. Fully compatible with native SpringMvc usage. 3. Minimal reliance on SpringMvc related packages and SLF4J. 4. Supports springboot and non-springboot modes. #### The effect is as follows ##### BEFORE ``` @RestController @RequestMapping("/test") public class HelloController { @RequestMapping("/hello1") public String hello1(String name) { return "hello " + name + "!"; } @RequestMapping("/hello2") public String hello2(TestPojo pojo) { return pojo.toString(); } @RequestMapping("/hello3/{type}") public String hello3(@PathVariable(value = "type") String type){ return type; } public String skip(){ return "skip"; } } ``` ##### AFTER ``` @Rest("/test") public class HelloController { public String hello1(String name) { return "hello " + name + "!"; } public String hello2(TestPojo pojo) { return pojo.toString(); } @RequestMapping("/hello3/{type}") public String hello3(@PathVariable(value = "type") String type){ return type; } @SkipMapping public String skip(){ return "skip"; } } ``` #### How to start ##### 1. Using springboot Modules are introduced and ready to use. ``` org.fanjr.simplify simplify-rest-starter 1.0.0 ``` ##### 2. Just using spring The introduction of the module. ``` org.fanjr.simplify simplify-rest-core 1.0.0 ``` Also configure the springbean as follows ``` ```