【问题标题】:Tree Component in Vaadin latest version doesn't workVaadin 最新版本中的树组件不起作用
【发布时间】:2017-08-08 10:11:52
【问题描述】:

我尝试在我的 maven 项目中使用带有最新版本 Vaadin 的 Tree() method 和 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() 并解决此错误?

【问题讨论】:

    标签: java maven vaadin spring-boot-test


    【解决方案1】:

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

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

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-10-26
    • 2016-10-05
    • 2023-03-13
    • 1970-01-01
    • 2019-09-25
    • 2021-05-08
    • 2023-04-07
    • 1970-01-01
    相关资源
    最近更新 更多