123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- package cn.newfeifan.mall.server.controller;
- import cn.newfeifan.mall.framework.common.pojo.CommonResult;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RestController;
- import static cn.newfeifan.mall.framework.common.exception.enums.GlobalErrorCodeConstants.NOT_IMPLEMENTED;
- /**
- * 默认 Controller,解决部分 module 未开启时的 404 提示。
- * 例如说,/bpm/** 路径,工作流
- *
- * @author 非繁源码
- */
- @RestController
- public class DefaultController {
- @RequestMapping("/admin-api/bpm/**")
- public CommonResult<Boolean> bpm404() {
- return CommonResult.error(NOT_IMPLEMENTED.getCode(),
- "[工作流模块 feifan-module-bpm - 已禁用][参考 https://doc.iocoder.cn/bpm/ 开启]");
- }
- @RequestMapping("/admin-api/mp/**")
- public CommonResult<Boolean> mp404() {
- return CommonResult.error(NOT_IMPLEMENTED.getCode(),
- "[微信公众号 feifan-module-mp - 已禁用][参考 https://doc.iocoder.cn/mp/build/ 开启]");
- }
- @RequestMapping(value = {"/admin-api/product/**", // 商品中心
- "/admin-api/trade/**", // 交易中心
- "/admin-api/promotion/**"}) // 营销中心
- public CommonResult<Boolean> mall404() {
- return CommonResult.error(NOT_IMPLEMENTED.getCode(),
- "[商城系统 feifan-module-mall - 已禁用][参考 https://doc.iocoder.cn/mall/build/ 开启]");
- }
- @RequestMapping(value = {"/admin-api/report/**"})
- public CommonResult<Boolean> report404() {
- return CommonResult.error(NOT_IMPLEMENTED.getCode(),
- "[报表模块 feifan-module-report - 已禁用][参考 https://doc.iocoder.cn/report/ 开启]");
- }
- @RequestMapping(value = {"/admin-api/pay/**"})
- public CommonResult<Boolean> pay404() {
- return CommonResult.error(NOT_IMPLEMENTED.getCode(),
- "[支付模块 feifan-module-pay - 已禁用][参考 https://doc.iocoder.cn/pay/build/ 开启]");
- }
- }
|