将滚动条添加到angularjs

时间:2019-02-25 11:58:48

标签: html angularjs spring

在管理员上创建用户时,我想使用滚动条添加用户角色的选择,但我不明白为什么我选择的角色值未传输

 <div class="bloc">
    <select name="role" size="3">
        <option value="ROLE_USER" ng-model="user.roles">USER</option>
        <option value="ROLE_SUPPORT" ng-model="user.roles">SUPPORT</option>
    </select>
</div>

角色是用户的角色,逻辑是用spring编写的

public class User extends BaseEntity<Integer> {


public enum Roles {
    ADMIN
}

private String firstName;
private String lastName;
@Column(name = "username")
private String username;
@Convert(converter = PurshasedProductConverter.class)
private List<PurshasedProduct> purshasedProducts;


private String email;
private String activationCode;

@Convert(converter = AttachmentConverter.class)
private Attachment userAvatar;
public Attachment getUserAvatar() {
    return userAvatar;
}

public void setUserAvatar(Attachment userAvatar) {
    this.userAvatar = userAvatar;
}


@JsonProperty(access = Access.WRITE_ONLY)
private String password;
@JsonProperty(access = Access.WRITE_ONLY)
private String temporaryPassword;

@Convert(converter = StringArrayConverter.class)
private String[] roles;

private Date lastPasswordReset;

private Date dateCreated;
private Date dateUpdated;
private Date validatyTime;
private Boolean active;

public User() {
    lastPasswordReset = dateCreated = dateUpdated = new Date();
}

0 个答案:

没有答案