apache / apache/fesod

是否考虑支持组合注解的方式设置excel导出的样式

Open
#296 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
6.2k
Forks
532
Avg merge
1d 3h
Merged PRs (30d)
42

Description

1、新建一个组合注解:

```
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD, ElementType.TYPE})
@Documented
@HeadStyle(fillPatternType = FillPatternType.SOLID_FOREGROUND)
@ColumnWidth(50)
public @interface SysExcelStyle {
}
```

2、应用于导出对象中:

```
@Data
@SysExcelStyle
public class IdExcelVO {
@ApiModelProperty(value = "id", example = "1")
private Integer id;
}
```

实际应用中发现@SysExcelStyle组合注解并未生效,导出的样式仍然是默认样式

目前我使用的是定义抽象类A,用注解注释;具体的导出类继承A。(相对注解组合还是不够好用)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.