Spring boot 在Intellij IDEA中将vaadin添加到Spring启动项目时出错
将Vaadin添加到我的Spring boot项目(我正在使用Intellij IDEA)时出现以下错误: 这是pom.xml中的相关部分,与vaadin网站上建议的内容相同:Spring boot 在Intellij IDEA中将vaadin添加到Spring启动项目时出错,spring-boot,maven,dependencies,vaadin,pom.xml,Spring Boot,Maven,Dependencies,Vaadin,Pom.xml,将Vaadin添加到我的Spring boot项目(我正在使用Intellij IDEA)时出现以下错误: 这是pom.xml中的相关部分,与vaadin网站上建议的内容相同: <<dependencyManagement> <dependencies> <dependency> <groupId>com.vaadin</groupId> &l
<<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-bom</artifactId>
<!-- declare the latest Vaadin version
as a property or directly here -->
<version>${vaadin.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>
vaadin-spring-boot-starter
</artifactId>
<version>${vaadin.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<!-- The Spring Boot Maven plugin for easy
execution from CLI and packaging -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
<!--
Takes care of synchronizing java
dependencies and imports in package.json and
main.js files. It also creates
webpack.config.js if does not exist yet.
-->
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.version}</version>
<executions>
<execution>
<goals>
<goal>prepare-frontend</goal>
<goal>build-frontend</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
org.springframework.boot
springbootmaven插件
com.vaadin
vaadin maven插件
${vaadin.version}
准备前端
构建前端
我怎样才能修好它?
我需要配置其他东西吗
谢谢此错误表示您在pom.xml中的
代码段中缺少版本YourWantUse
。例如,Vaadin spring boot starter的以下部分包括:
1.8
1.8
UTF-8
UTF-8
14.1.25
正如代码段中的注释所述,您可以直接用值替换对${vaadin.version}
的引用(如14.1.25
)或使用
,如上所示
<<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-bom</artifactId>
<!-- declare the latest Vaadin version
as a property or directly here -->
<version>${vaadin.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>
vaadin-spring-boot-starter
</artifactId>
<version>${vaadin.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<!-- The Spring Boot Maven plugin for easy
execution from CLI and packaging -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
<!--
Takes care of synchronizing java
dependencies and imports in package.json and
main.js files. It also creates
webpack.config.js if does not exist yet.
-->
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.version}</version>
<executions>
<execution>
<goals>
<goal>prepare-frontend</goal>
<goal>build-frontend</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>