All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.lq.cli.comment.CliConfig Maven / Gradle / Ivy

There is a newer version: 1.2.RELEASE
Show newest version
package com.lq.cli.comment;

public class CliConfig {

    private String springBootVersion;
    private boolean useWeb;
    private boolean useLog4j2;
    private boolean useMybatis;
    private String mybatisVersion;
    private String mysqlConnectorVersion;
    private boolean useDruid;
    private String druidVersion;
    private String druidMonitorUsername;
    private String druidMonitorPwd;
    private String fastJsonVersion;
    private boolean generateController;

    private CliConfig(Builder builder){
        this.springBootVersion = builder.springBootVersion;
        this.useWeb = builder.useWeb;
        this.useLog4j2 = builder.useLog4j2;
        this.useMybatis = builder.useMybatis;
        this.mybatisVersion = builder.mybatisVersion;
        this.mysqlConnectorVersion = builder.mysqlConnectorVersion;
        this.useDruid = builder.useDruid;
        this.druidVersion = builder.druidVersion;
        this.druidMonitorUsername = builder.druidMonitorUsername;
        this.druidMonitorPwd = builder.druidMonitorPwd;
        this.fastJsonVersion = builder.fastJsonVersion;
        this.generateController = builder.generateController;
    }

    public String getSpringBootVersion() {
        return springBootVersion;
    }

    public boolean isUseWeb() {
        return useWeb;
    }

    public boolean isUseLog4j2() {
        return useLog4j2;
    }

    public boolean isUseMybatis() {
        return useMybatis;
    }

    public String getMybatisVersion() {
        return mybatisVersion;
    }

    public String getMysqlConnectorVersion() {
        return mysqlConnectorVersion;
    }

    public boolean isUseDruid() {
        return useDruid;
    }

    public String getDruidVersion() {
        return druidVersion;
    }

    public String getDruidMonitorUsername() {
        return druidMonitorUsername;
    }

    public String getDruidMonitorPwd() {
        return druidMonitorPwd;
    }

    public String getFastJsonVersion() {
        return fastJsonVersion;
    }

    public boolean isGenerateController() {
        return generateController;
    }

    public static class Builder{
        private String springBootVersion = "2.1.2.RELEASE";
        private boolean useWeb = true;
        private boolean useLog4j2 = true;
        private boolean useMybatis = true;
        private String mybatisVersion = "1.3.2";
        private String mysqlConnectorVersion = "5.1.39";
        private boolean useDruid = true;
        private String druidVersion = "1.1.12";
        private String druidMonitorUsername = "admin";
        private String druidMonitorPwd = "123456";
        private String fastJsonVersion = "1.2.47";
        private boolean generateController = false;

        public Builder setSpringBootVersion(String springBootVersion) {
            this.springBootVersion = springBootVersion;
            return this;
        }

        public Builder setUseWeb(boolean useWeb) {
            this.useWeb = useWeb;
            return this;
        }

        public Builder setUseLog4j2(boolean useLog4j2) {
            this.useLog4j2 = useLog4j2;
            return this;
        }

        public Builder setUseMybatis(boolean useMybatis) {
            this.useMybatis = useMybatis;
            return this;
        }

        public Builder setMybatisVersion(String mybatisVersion) {
            this.mybatisVersion = mybatisVersion;
            return this;
        }

        public Builder setMysqlConnectorVersion(String mysqlConnectorVersion) {
            this.mysqlConnectorVersion = mysqlConnectorVersion;
            return this;
        }

        public Builder setUseDruid(boolean useDruid) {
            this.useDruid = useDruid;
            return this;
        }

        public Builder setDruidVersion(String druidVersion) {
            this.druidVersion = druidVersion;
            return this;
        }

        public Builder setDruidMonitorUsername(String druidMonitorUsername) {
            this.druidMonitorUsername = druidMonitorUsername;
            return this;
        }

        public Builder setDruidMonitorPwd(String druidMonitorPwd) {
            this.druidMonitorPwd = druidMonitorPwd;
            return this;
        }

        public Builder setFastJsonVersion(String fastJsonVersion) {
            this.fastJsonVersion = fastJsonVersion;
            return this;
        }

        public Builder setGenerateController(boolean generateController) {
            this.generateController = generateController;
            return this;
        }

        public CliConfig build(){
            return new CliConfig(this);
        }
    }

    @Override
    public String toString() {
        return "CliConfig{" +
                "springBootVersion='" + springBootVersion + '\'' +
                ", useWeb=" + useWeb +
                ", useLog4j2=" + useLog4j2 +
                ", useMybatis=" + useMybatis +
                ", mybatisVersion='" + mybatisVersion + '\'' +
                ", mysqlConnectorVersion='" + mysqlConnectorVersion + '\'' +
                ", useDruid=" + useDruid +
                ", druidVersion='" + druidVersion + '\'' +
                ", druidMonitorUsername='" + druidMonitorUsername + '\'' +
                ", druidMonitorPwd='" + druidMonitorPwd + '\'' +
                ", fastJsonVersion='" + fastJsonVersion + '\'' +
                ", generateController=" + generateController +
                '}';
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy