2017-03-17 71 views
0

我試圖使用Tree() method與我的Maven項目內Vaadin的最後一個版本用彈簧啓動創建一個下拉菜單簡單,但我無法導入正確的包。樹組件在Vaadin最新版本不起作用

我只是有這些依賴於我的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> 

這是錯誤: enter image description here

我應該怎麼做就Vaadin的最新版本中使用樹()和解決這個錯誤?

回答

3

Tree成分沒有完全準備好Vaadin 8呢。如果你想使用它,你必須使用vaadin-compatibility-server包。

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

欲瞭解更多詳情,您可以檢查[發行說明部分對傳統組件(https://vaadin.com/download/release/8.0/8.0.2/release-notes.html#legacycomponents)作爲以及[遷移建議](https://vaadin.com/docs/-/part/framework/migration/migrating-to-vaadin8.html) – Morfic

相關問題