Vaadin 最新版本中的树组件不起作用

Tree Component in Vaadin latest version doesn't work

我试图在我的 Maven 项目中使用 Tree() method 和最新版本的 Vaadin 以及 spring-boot 来创建下拉式简单菜单,但我无法导入正确的包。

我的 pom.xml 文件中只有这些依赖项:

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.5.2.RELEASE</version>
    </parent>
    <groupId>spring.boot.vaadin.admin</groupId>
    <artifactId>spring.boot.vaadin.admin.ui</artifactId>
    <version>0.0.1-SNAPSHOT</version>
   <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-spring-boot-starter</artifactId>
            <version>2.0.0</version>
        </dependency>
    </dependencies>
    <properties>
        <java.version>1.8</java.version>
    </properties>
    <build>
        <sourceDirectory>src/main/java</sourceDirectory>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <executable>true</executable>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                    <warName>spring-boot-vaadin-admin-ui-components</warName>
                </configuration>
            </plugin>
        </plugins>
        <finalName>spring-boot-vaadin-admin-ui-components</finalName>
    </build>
    <packaging>war</packaging>
</project>

这是错误:

如何在最新版本的 Vaadin 上使用 Tree() 并解决此错误?

Tree 组件尚未完全准备好用于 Vaadin 8。如果你想使用它,你必须使用 vaadin-compatibility-server 包。

<dependency>
    <groupId>com.vaadin</groupId>
    <artifactId>vaadin-compatibility-server</artifactId>
    <version>8.0.2</version>
</dependency>