diff --git a/src/main/java/com/codesdream/ase/model/activity/Activity.java b/src/main/java/com/codesdream/ase/model/activity/Activity.java index 2a0b4f2..6359756 100644 --- a/src/main/java/com/codesdream/ase/model/activity/Activity.java +++ b/src/main/java/com/codesdream/ase/model/activity/Activity.java @@ -137,11 +137,10 @@ public class Activity { //提前提醒时间 @Column(name = "remind_time", nullable = true) - @Temporal(TemporalType.TIMESTAMP) private LocalDateTime remindTime; //附件组(名字) - @ElementCollection(targetClass = java.lang.String.class) + @ElementCollection(targetClass = String.class) private List enclosures; //主要负责人 diff --git a/src/main/java/com/codesdream/ase/validator/TestNullValueValidator.java b/src/main/java/com/codesdream/ase/validator/TestNullValueValidator.java new file mode 100644 index 0000000..a7c4a84 --- /dev/null +++ b/src/main/java/com/codesdream/ase/validator/TestNullValueValidator.java @@ -0,0 +1,27 @@ +package com.codesdream.ase.validator; + +import com.codesdream.ase.model.activity.Activity; +import javafx.beans.binding.ObjectExpression; + +import java.lang.reflect.Field; + +public class TestNullValueValidator { + + public static void main(String[] args){ + Activity activity = new Activity(); + TestNullValueValidator.run(activity); + + } + + static void run(Object object){ + Field[] fields = object.getClass().getDeclaredFields(); + for (Field field : fields){ + String name = field.getName(); + name = name.substring(0,1).toUpperCase()+name.substring(1); + String type = field.getGenericType().toString(); + System.out.println("name: " + name); + System.out.println("Type: " + type); + System.out.println(); + } + } +}