【发布时间】:2017-03-18 20:46:16
【问题描述】:
我正在尝试导入 com.vaadin.shared.ui.JavaScriptComponentState。我在 vaadin 7 中使用了这个导入,但是当我更新到 vaadin 8 时,我不能再这样做了。 我在 pom 中使用 vaadin bom 8.0.3。 任何提示我在这里做错了什么?
import com.vaadin.shared.ui.JavaScriptComponentState;
public class Graph extends JavaScriptComponentState {
private ArrayList<String> nodes;
private ArrayList<String> edges;
public ArrayList<String> getNodes() {
return nodes;
}
public ArrayList<String> getEdges() {
return edges;
}
}
错误:
The import com.vaadin.shared.ui.JavaScriptComponentState cannot be resolved
【问题讨论】:
-
我们需要查看一些代码,如果有任何错误...
-
已编辑。如果您需要更多信息,请告诉我。
-
确保在 pom.xml 的
dependencies部分中添加了正确的依赖项。仅在dependencyManagement部分中添加 bom 是不够的。你需要<dependency><groupId>com.vaadin</groupId><artifactId>vaadin-server</artifactId></dependency>。 -
请在您的 pom.xml 文件中添加您的依赖项部分。有点不对劲
-
嘿,谢谢 A. Meier 有正确的提示。 :)
标签: spring-boot vaadin vaadin8