小编ase*_*ec4的帖子

如何使用客户端Validator Validate方法调用的返回值在EditorDriver上设置ConstraintViolations

使用GWT 2.5.0,我想使用客户端验证和编辑器.尝试将ConstraintViolation java.util.Set传递给EditorDriver时遇到以下错误,如下所示.

Validator a = Validation.buildDefaultValidatorFactory().getValidator();
Set<ConstraintViolation<Person>> b = a.validate(person);
editorDriver.setConstraintViolations(b);
Run Code Online (Sandbox Code Playgroud)

The method setConstraintViolations(Iterable<ConstraintViolation<?>>) in the type EditorDriver<Person> is not applicable for the arguments (Set<ConstraintViolation<Person>>)

我能找到的唯一有点相关的帖子是问题6270!

下面是一个示例,它带有一个带有Person Editor的PopUpDialog,允许您指定一个名称并根据您的注释对其进行验证.在personDriver.setConstraintViolations(violations);PersonEditorDialog中注释掉该行将允许您运行该示例.

我没有足够的声誉点来发布示例的图像.


public class Person {

@NotNull(message = "You must have a name")

@Size(min = 3, message = "Your name must contain more than 3 characters")

private String name;

public String getName() {

return name;

}

public void setName(String name) {

this.name = name;

}

} …
Run Code Online (Sandbox Code Playgroud)

gwt gwt-editors gwt-validation

5
推荐指数
1
解决办法
1158
查看次数

如何在 Ubuntu 18 上运行的 Virtual Box 中为 Androidx86 8.1rc2 VM 启用蓝牙

我正在尝试使用以下命令在我的 Android VM 上启用蓝牙

  • 乌班图18.04.1
  • Virtual Box 6.0.2 r128162 带扩展包 6.0.2 r128162
  • Android-x86 8.1rc2
  • Cambridge Silicon Radio, Ltd 蓝牙适配器(HCI 模式)

我已将我的用户添加到此处提到的vboxusers组,这使我能够在 USB 设备的 VM 列表中看到蓝牙适配器。我添加了一个过滤器,并尝试在连接或不连接加密狗的情况下启动设备,但都不允许我打开蓝牙。

Android 上的终端模拟器

运行 hcitool dev Devices: 返回无设备。

hciconfig -a
在此输入图像描述

运行 hciconfig hci0 up 在此输入图像描述

无法初始化设备 hci0:不允许操作(1)

任何帮助表示赞赏。

android virtualbox bluetooth android-x86

5
推荐指数
1
解决办法
4096
查看次数

spring-boot-starter-parent 资源包含/排除解释

我对 spring-boot-starter-parent 版本 2.2.4.RELEASE 中的资源标签有点困惑。使用相同模式的包含和排除的目的是什么?

<resources>
  <resource>
    <filtering>true</filtering>
    <directory>${basedir}/src/main/resources</directory>
    <includes>
      <include>**/application*.yml</include>
      <include>**/application*.yaml</include>
      <include>**/application*.properties</include>
    </includes>
  </resource>
  <resource>
    <directory>${basedir}/src/main/resources</directory>
    <excludes>
      <exclude>**/application*.yml</exclude>
      <exclude>**/application*.yaml</exclude>
      <exclude>**/application*.properties</exclude>
    </excludes>
  </resource>
</resources>
Run Code Online (Sandbox Code Playgroud)

spring maven spring-boot

3
推荐指数
1
解决办法
484
查看次数