@Deprecated
    public TemplateConfig disable(@NotNull TemplateType... templateTypes) {
        if (templateTypes != null) {
            for (TemplateType templateType : templateTypes) {
                switch (templateType) {
                    case ENTITY:
                        this.entity = null;
                        this.entityKt = null;
                        //暂时没其他多的需求,使用一个单独的boolean变量进行支持一下.
                        this.disableEntity = true;
                        break;
                    case CONTROLLER:
                        this.controller = null;
                        break;
                    case MAPPER:
                        this.mapper = null;
                        break;
                    case XML:
                        this.xml = null;
                        break;
                    case SERVICE:
                        this.service = null;
                        break;
                    case SERVICE_IMPL:
                        this.serviceImpl = null;
                        break;
                    default:
                }
            }
        }
        return this;
    }
@Test
    void disableTest() {
        TemplateConfig templateConfig;
        templateConfig = GeneratorBuilder.templateConfig().disable();
        Assertions.assertNull(templateConfig.getController());
        Assertions.assertNull(templateConfig.getService());
        Assertions.assertNull(templateConfig.getServiceImpl());
        Assertions.assertNull(templateConfig.getMapper());
        Assertions.assertNull(templateConfig.getXml());
        Assertions.assertNull(templateConfig.getEntity(true));
        Assertions.assertNull(templateConfig.getEntity(false));


        templateConfig = GeneratorBuilder.templateConfig().disable(TemplateType.SERVICE);
        Assertions.assertNull(templateConfig.getService());
        Assertions.assertNotNull(templateConfig.getEntity(true));
        Assertions.assertNotNull(templateConfig.getEntity(false));

        templateConfig = GeneratorBuilder.templateConfig().disable(TemplateType.SERVICE_IMPL);
        Assertions.assertNull(templateConfig.getServiceImpl());
        Assertions.assertNotNull(templateConfig.getEntity(true));
        Assertions.assertNotNull(templateConfig.getEntity(false));

        templateConfig = GeneratorBuilder.templateConfig().disable(TemplateType.ENTITY);
        Assertions.assertNotNull(templateConfig.getServiceImpl());
        Assertions.assertNotNull(templateConfig.getService());
        Assertions.assertNull(templateConfig.getEntity(true));
        Assertions.assertNull(templateConfig.getEntity(false));

        templateConfig = GeneratorBuilder.templateConfig().disable(TemplateType.ENTITY);
        Assertions.assertNotNull(templateConfig.getServiceImpl());
        Assertions.assertNotNull(templateConfig.getService());
        Assertions.assertNull(templateConfig.getEntity(true));
        Assertions.assertNull(templateConfig.getEntity(false));
    }