Spring Boot SpEL ConditionalOnExpression检查特定属性的多个值

时间:2019-02-11 18:58:55

标签: java spring spring-boot spring-el

我创建了@ConditionalOnExpression(“'$ {property1}'!='local,log-debug' 和'$ {property1}'!='local'“) 为此,我们有没有优化的游戏

1 个答案:

答案 0 :(得分:2)

您可能要使用此

 @Override
 public void setTableData(List<User> userDetails) {
    userTable = new DataGrid<User>();

    TextColumn<User> columnUserId= new TextColumn<User>() {
        @Override
        public String getValue(User user) {
            return user.getUser_id();
        }
    };

    userTable.addColumn(columnUserId,"UserID");
    userTable.setColumnWidth(columnUserId,20,Style.Unit.PX);

    TextColumn<User> columnName = new TextColumn<User>() {
        @Override
        public String getValue(User user) {
            return user.getName();
        }
    };

    userTable.addColumn(columnName,"Name");
    //userTable.setColumnWidth(columnName,60,Style.Unit.PX);
    TextColumn<User> columnRole = new TextColumn<User>() {
        @Override
        public String getValue(User user) {
            return user.getRole();
        }
    };

    userTable.addColumn(columnRole,"Role");
    TextColumn<User> columnIsActive = new TextColumn<User>() {
        @Override
        public String getValue(User user) {
            return user.getIsActive();
        }
    };

    userTable.addColumn(columnIsActive,"Active");
    TextColumn<User> columnProduct = new TextColumn<User>() {
        @Override
        public String getValue(User user) {
            return user.getProduct();
        }
    };

    userTable.addColumn(columnProduct, "Product");
    userTable.setSelectionModel(selectionModel);


    userTable.setRowCount(userDetails.size());
    userTable.setRowData(0,userDetails);
    //userTable.redraw();



}