[英]IntelliJ running wrong version of SpringBoot - mvn and java jar work correctly
I am running version 2018.1.2 of IntelliJ. 我正在运行IntelliJ的2018.1.2版本。 Whenever I run or debug my application from within IntelliJ, Springboot is running version 2.0.0.RELEASE (and erroring out).
每当我从IntelliJ中运行或调试应用程序时,Springboot就会运行2.0.0.RELEASE版本(并出错)。 The pom.xml has the following set:
pom.xml具有以下设置:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
When I run mvn clean package
, I can see that it is running version 2.0.1.RELEASE and everything works as expected. 当我运行
mvn clean package
,可以看到它正在运行版本2.0.1.RELEASE,并且一切正常。 I have also tried running java -jar app.jar
and it is showing 2.0.1.RELEASE. 我也尝试运行
java -jar app.jar
,它显示的是2.0.1.RELEASE。
I have looked all over IntelliJ to see if there are any additional settings or places to override the version and I have found nothing. 我到处看IntelliJ,看看是否还有其他设置或地方可以覆盖该版本,但我什么也没发现。 Does anyone know how to ensure the version of Springboot within IntelliJ?
有谁知道如何确保IntelliJ中的Springboot版本?
I'm not sure what the actual fix is, but I can provide the steps that resolved the issue: 我不确定实际的解决方案是什么,但是我可以提供解决问题的步骤:
None of the files or steps really changed, but this process somehow fixed things. 这些文件或步骤都没有真正更改,但是此过程以某种方式固定了某些内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.