perf: 优化API 版本控制

pull/10/head
Carina 3 years ago
parent 5a6bc4892c
commit c7608cfc77

File diff suppressed because one or more lines are too long

@ -40,7 +40,7 @@ import javax.servlet.http.HttpServletResponse;
*/
@Api(tags = GenLogsApi.TITLE)
@Slf4j
@ApiRestController("/generator/logs/{ver}")
@ApiRestController("/{ver}/generator/logs")
public class GenLogsRestController extends BaseRestController<GenLogs, GenLogsModel, IGenLogsService>
implements GenLogsApi {

@ -57,7 +57,7 @@ import java.util.Map;
*/
@Api(tags = TableApi.TITLE)
@Slf4j
@ApiRestController("/generator/table/{ver}")
@ApiRestController("/{ver}/generator/table")
public class GenTableRestController extends BaseRestController<GenTable, GenTableModel, IGenTableService>
implements TableApi {

@ -54,7 +54,7 @@ import org.opsli.modulars.generator.template.service.IGenTemplateDetailService;
*/
@Api(tags = GenTemplateDetailRestApi.TITLE)
@Slf4j
@ApiRestController("/generator/template/detail/{ver}")
@ApiRestController("/{ver}/generator/template/detail")
public class GenTemplateDetailRestController extends BaseRestController<GenTemplateDetail, GenTemplateDetailModel, IGenTemplateDetailService>
implements GenTemplateDetailRestApi {

@ -53,7 +53,7 @@ import org.opsli.modulars.generator.template.service.IGenTemplateService;
*/
@Api(tags = GenTemplateRestApi.TITLE)
@Slf4j
@ApiRestController("/generator/template/{ver}")
@ApiRestController("/{ver}/generator/template/")
public class GenTemplateRestController extends BaseRestController<GenTemplate, GenTemplateModel, IGenTemplateService>
implements GenTemplateRestApi {

@ -71,7 +71,7 @@ import java.util.Set;
*/
@Api(tags = SysAreaRestApi.TITLE)
@Slf4j
@ApiRestController("/system/area/{ver}")
@ApiRestController("/{ver}/system/area")
public class SysAreaRestController extends BaseRestController<SysArea, SysAreaModel, ISysAreaService>
implements SysAreaRestApi {

@ -56,7 +56,7 @@ import java.util.List;
*/
@Api(tags = DictDetailApi.TITLE)
@Slf4j
@ApiRestController("/system/dict/detail/{ver}")
@ApiRestController("/{ver}/system/dict/detail")
public class DictDetailRestController extends BaseRestController<SysDictDetail, DictDetailModel, IDictDetailService>
implements DictDetailApi {

@ -59,7 +59,7 @@ import java.util.List;
*/
@Api(tags = DictApi.TITLE)
@Slf4j
@ApiRestController("/system/dict/{ver}")
@ApiRestController("/{ver}/system/dict")
public class DictRestController extends BaseRestController<SysDict, DictModel, IDictService>
implements DictApi {

@ -42,7 +42,7 @@ import javax.servlet.http.HttpServletRequest;
*/
@Api(tags = LogsApi.TITLE)
@Slf4j
@ApiRestController("/system/logs/{ver}")
@ApiRestController("/{ver}/system/logs")
public class LogsRestController extends BaseRestController<SysLogs, LogsModel, ILogsService>
implements LogsApi {

@ -73,7 +73,7 @@ import java.util.Map;
*/
@Api(tags = MenuApi.TITLE)
@Slf4j
@ApiRestController("/system/menu/{ver}")
@ApiRestController("/{ver}/system/menu")
public class MenuRestController extends BaseRestController<SysMenu, MenuModel, IMenuService>
implements MenuApi {

@ -35,7 +35,7 @@ import java.util.Map;
*/
@Api(tags = "系统监控")
@Slf4j
@ApiRestController("/system/monitor/{ver}")
@ApiRestController("/{ver}/system/monitor")
public class MonitorController {
/**

@ -60,7 +60,7 @@ import java.util.Map;
*/
@Api(tags = OptionsApi.TITLE)
@Slf4j
@ApiRestController("/system/options/{ver}")
@ApiRestController("/{ver}/system/options")
public class SysOptionsRestController extends BaseRestController<SysOptions, OptionsModel, ISysOptionsService>
implements OptionsApi {

@ -73,7 +73,7 @@ import java.util.Set;
*/
@Api(tags = SysOrgRestApi.TITLE)
@Slf4j
@ApiRestController("/system/org/{ver}")
@ApiRestController("/{ver}/system/org")
public class SysOrgRestController extends BaseRestController<SysOrg, SysOrgModel, ISysOrgService>
implements SysOrgRestApi {

@ -48,7 +48,7 @@ import java.util.stream.Collectors;
*/
@Api(tags = RoleMenuRefApi.TITLE)
@Slf4j
@ApiRestController("/system/role/perms/{ver}")
@ApiRestController("/{ver}/system/role/perms")
public class RoleMenuRefRestController implements RoleMenuRefApi {
/** 配置类 */

@ -49,7 +49,7 @@ import java.lang.reflect.Method;
*/
@Api(tags = "角色管理")
@Slf4j
@ApiRestController("/system/role/{ver}")
@ApiRestController("/{ver}/system/role")
public class RoleRestController extends BaseRestController<SysRole, RoleModel, IRoleService>
implements RoleApi {

@ -52,7 +52,7 @@ import java.lang.reflect.Method;
*/
@Api(tags = TenantApi.TITLE)
@Slf4j
@ApiRestController("/system/tenant/{ver}")
@ApiRestController("/{ver}/system/tenant")
public class TenantRestController extends BaseRestController<SysTenant, TenantModel, ITenantService>
implements TenantApi {

@ -54,7 +54,7 @@ import java.util.List;
*/
@Api(tags = UserOrgRefApi.TITLE)
@Slf4j
@ApiRestController("/system/user/org/{ver}")
@ApiRestController("/{ver}/system/user/org")
public class UserOrgRefRestController implements UserOrgRefApi {
/** 配置类 */

@ -82,7 +82,7 @@ import java.util.List;
*/
@Api(tags = UserApi.TITLE)
@Slf4j
@ApiRestController("/system/user/{ver}")
@ApiRestController("/{ver}/system/user")
public class UserRestController extends BaseRestController<SysUser, UserModel, IUserService>
implements UserApi {

@ -50,7 +50,7 @@ import java.util.List;
*/
@Api(tags = UserRoleRefApi.TITLE)
@Slf4j
@ApiRestController("/system/user/roles/{ver}")
@ApiRestController("/{ver}/system/user/roles")
public class UserRoleRefRestController implements UserRoleRefApi {
/** 配置类 */

@ -13,7 +13,7 @@ import org.springframework.web.bind.annotation.GetMapping;
* @date 2021102712:50:00
*/
@Api(tags = "API-测试版本控制")
@ApiRestController("/tools/api/{ver}")
@ApiRestController("/{ver}/tools/api")
public class ApiController {
@ApiOperation(value = "测试正常接口", notes = "测试正常接口")

@ -21,7 +21,7 @@ import org.springframework.web.bind.annotation.RequestBody;
*/
@Api(tags = "邮件类")
@Slf4j
@ApiRestController("/tools/email/{ver}")
@ApiRestController("/{ver}/tools/email")
public class EmailRestController {
@Autowired

@ -13,7 +13,7 @@ import org.opsli.common.annotation.ApiRestController;
*/
@Api(tags = "文件管理类")
@Slf4j
@ApiRestController("/tools/oss/{ver}")
@ApiRestController("/{ver}/tools/oss")
public class OssRestController {

@ -36,7 +36,7 @@ import java.util.Set;
*/
@Api(tags = "搜索历史记录")
@Slf4j
@ApiRestController("/tools/searchhis/{ver}")
@ApiRestController("/{ver}/tools/searchhis")
public class SearchHisRestController {
/**

@ -47,7 +47,7 @@ import org.opsli.api.web.gentest.carinfo.TestCarRestApi;
*/
@Api(tags = TestCarRestApi.TITLE)
@Slf4j
@ApiRestController("/gentest/carinfo/{ver}")
@ApiRestController("/{ver}/gentest/carinfo")
public class TestCarRestController extends BaseRestController<TestCar, TestCarModel, ITestCarService>
implements TestCarRestApi {

@ -48,7 +48,7 @@ import java.lang.reflect.Method;
*/
@Api(tags = TestUserRestApi.TITLE)
@Slf4j
@ApiRestController("/gentest/user/{ver}")
@ApiRestController("/{ver}/gentest/user")
public class TestUserRestController extends BaseRestController<TestUser, TestUserModel, ITestUserService>
implements TestUserRestApi {

@ -32,7 +32,7 @@ import java.lang.reflect.Method;
*/
@Api(tags = "测试类")
@Slf4j
@ApiRestController("/test/{ver}")
@ApiRestController("/{ver}/test")
public class TestRestController extends BaseRestController<TestEntity, TestModel, ITestService>
implements TestRestApi {

@ -153,8 +153,8 @@ opsli:
url-patterns: "/*"
# 排除过滤URL
url-exclusion:
- "/api/generator/template/v1/insertAndDetail"
- "/api/generator/template/v1/updateAndDetail"
- "/api/v1/generator/template/insertAndDetail"
- "/api/v1/generator/template/updateAndDetail"
- "/static/files/"
- "/doc.html"

Loading…
Cancel
Save