Search in sources :

Example 1 with MybatisPlusException

use of com.baomidou.mybatisplus.core.exceptions.MybatisPlusException in project dynamic_dataSource by tianliuzhen.

the class CodeGenerator method scanner.

/**
 * <p>
 * 读取控制台内容
 * </p>
 */
public static String scanner(String tip) {
    Scanner scanner = new Scanner(System.in);
    StringBuilder help = new StringBuilder();
    help.append("请输入" + tip + ":");
    System.out.println(help.toString());
    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.core.exceptions.MybatisPlusException)

Example 2 with MybatisPlusException

use of com.baomidou.mybatisplus.core.exceptions.MybatisPlusException in project seckill by yt-King.

the class CodeGenerator method scanner.

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

Example 3 with MybatisPlusException

use of com.baomidou.mybatisplus.core.exceptions.MybatisPlusException in project springboot-learning by lyb-geek.

the class CodeGeneratorUtils method scanner.

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

Example 4 with MybatisPlusException

use of com.baomidou.mybatisplus.core.exceptions.MybatisPlusException in project matecloud by matevip.

the class ManualGenerator method scanner.

public static String scanner(String tip) {
    Scanner scanner = new Scanner(System.in);
    StringBuilder help = new StringBuilder();
    help.append("请输入" + tip + ":");
    System.out.println(help.toString());
    if (scanner.hasNext()) {
        String ipt = scanner.next();
        if (StringUtils.isNotBlank(ipt)) {
            return ipt;
        }
    }
    throw new MybatisPlusException("请输入正确的" + tip + "!");
}
Also used : Scanner(java.util.Scanner) MybatisPlusException(com.baomidou.mybatisplus.core.exceptions.MybatisPlusException)

Example 5 with MybatisPlusException

use of com.baomidou.mybatisplus.core.exceptions.MybatisPlusException in project mall-learning by macrozheng.

the class MyBatisPlusGenerator method scanner.

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

Aggregations

MybatisPlusException (com.baomidou.mybatisplus.core.exceptions.MybatisPlusException)15 Scanner (java.util.Scanner)14 IOException (java.io.IOException)1 SneakyThrows (lombok.SneakyThrows)1