weaver-hrm-salary/src/com/engine/salary/util/excel/ExcelProperty.java

16 lines
629 B
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.engine.salary.util.excel;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface ExcelProperty {
public int index(); // 指定 JavaBean 的属性对应 excel 的第几列
public String format() default "yyyy-MM-dd"; // 当 JavaBean 的属性为 Date 类型时,指定 Date 的格式化模式
public String msg() default "解析错误";//当因excel中数据格式错误而造成的解析异常时提示的错误信息
}