com.ruoyi.common.exception.DemoModeException Java Examples

The following examples show how to use com.ruoyi.common.exception.DemoModeException. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RestControllerAspect.java    From RuoYi with Apache License 2.0 5 votes vote down vote up
/**
 * 演示模式下以下方法不允许操作
 * @param methodName 方法名
 */
private void demoMode(String methodName){
    List<String> methodNameList = Arrays.asList("SysProfileController.resetPwd","SysProfileController.update");
    if(methodName.contains(".remove") || methodNameList.contains(methodName)){
        throw new DemoModeException();
    }
}
 
Example #2
Source File: GlobalExceptionHandler.java    From supplierShop with MIT License 4 votes vote down vote up
/**
 * 演示模式异常
 */
@ExceptionHandler(DemoModeException.class)
public AjaxResult demoModeException(DemoModeException e)
{
    return AjaxResult.error("演示模式,不允许操作");
}
 
Example #3
Source File: GlobalExceptionHandler.java    From RuoYi-Vue with MIT License 4 votes vote down vote up
/**
 * 演示模式异常
 */
@ExceptionHandler(DemoModeException.class)
public AjaxResult demoModeException(DemoModeException e)
{
    return AjaxResult.error("演示模式,不允许操作");
}
 
Example #4
Source File: DefaultExceptionHandler.java    From ruoyiplus with MIT License 4 votes vote down vote up
/**
 * 演示模式异常
 */
@ExceptionHandler(DemoModeException.class)
public AjaxResult demoModeException(DemoModeException e)
{
    return AjaxResult.error("演示模式,不允许操作");
}
 
Example #5
Source File: GlobalExceptionHandler.java    From RuoYi with Apache License 2.0 4 votes vote down vote up
/**
 * 演示模式异常
 */
@ExceptionHandler(DemoModeException.class)
public AjaxResult demoModeException(DemoModeException e) {
    log.error(e.getMessage(), e);
    return AjaxResult.error(e.getMessage());
}