1.String 类型
@ElementCollection(targetClass = String.class,fetch = FetchType.EAGER)
@CollectionTable(name = "TASK_MEDIAS")
private List<String> medias = new ArrayList<>();
2. 枚举类型
@Column(name = "PERMISSIONS")
@ElementCollection(targetClass = Permission.class, fetch = FetchType.EAGER)
@CollectionTable(name = "ROLE_PERMISSIONS")
@Enumerated(EnumType.STRING)
private Set<Permission> permissions;