Search in sources :

Example 1 with MybatisPlusException

use of com.baomidou.mybatisplus.exceptions.MybatisPlusException in project zblCode by zbl5337.

the class CodeGenerator method scanner.

/**
 * 读取控制台内容
 */
private static String scanner(String tip) {
    Scanner scanner = new Scanner(System.in);
    System.out.println(("请输入" + tip + ":"));
    if (scanner.hasNext()) {
        String ipt = scanner.next();
        if (StringUtils.isNotEmpty(ipt)) {
            return ipt;
        }
    }
    throw new MybatisPlusException("请输入正确的" + tip + "!");
}
Also used : Scanner(java.util.Scanner) MybatisPlusException(com.baomidou.mybatisplus.exceptions.MybatisPlusException)

Aggregations

MybatisPlusException (com.baomidou.mybatisplus.exceptions.MybatisPlusException)1 Scanner (java.util.Scanner)1