用于模板下载

    1. package com.ai.hdl.market.infrastructure.utils.easyexcel;
    2. import java.lang.annotation.*;
    3. /**
    4. * 在下载的表给数据对象字段上添加该注解,设置表格下拉框
    5. */
    6. @Documented
    7. @Retention(RetentionPolicy.RUNTIME)
    8. @Target({ElementType.FIELD})
    9. public @interface ExplicitConstraint {
    10. //定义固定下拉内容
    11. String[] source() default {};
    12. //定义动态下拉内容
    13. Class[] sourceClass() default {};
    14. /**
    15. * 动态下拉框实现该接口
    16. */
    17. public interface IExplicitInterface {
    18. /**
    19. * 下拉列表的内容数组
    20. * @return String[]
    21. */
    22. String[] source();
    23. }
    24. }