itfsw/mybatis-generator-plugin

希望可以给生成的枚举添加一个实现接口

Closed this issue · 1 comments

例如通过配置方式

<property name="rootClass" value="com.base.baseEnum"/>

接口

public interface baseEnum {
}

生成:

public enum Status  implements baseEnum{
        LOGIN_SUCCESS(0L, "登录成功"),
        LOGIN_FAIL(1L, "登录失败");

        private final Long value;
        private final String name;

        Status(Long value, String name) {
            this.value = value;
            this.name = name;
        }
        public Long getValue() {
            return this.value;
        }
        public Long value() {
            return this.value;
        }
        public String getName() {
            return this.name;
        }
    }

已解决