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) @Api(tags = GenLogsApi.TITLE)
@Slf4j @Slf4j
@ApiRestController("/generator/logs/{ver}") @ApiRestController("/{ver}/generator/logs")
public class GenLogsRestController extends BaseRestController<GenLogs, GenLogsModel, IGenLogsService> public class GenLogsRestController extends BaseRestController<GenLogs, GenLogsModel, IGenLogsService>
implements GenLogsApi { implements GenLogsApi {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save