[英]How to add a spring-boot jar as a dependency in a new spring-boot project without changing the original pom
[英]How to add a non-spring-boot dependency to the pom.xml in a spring-boot project
我有一个Spring Boot
项目,我想在那里使用对ModelMaker
的依赖:
<dependency>
<groupId>org.modelmapper</groupId>
<artifactId>modelmapper</artifactId>
<version>2.3.6</version>
</dependency>
如果我添加它,我会收到错误消息:
Save could not be completed. Try File > Save As... if the problem persists.
Reason:
Could not write file pom.xml
details:
Could not write file: D:\...\pom.xml.
D:\...\pom.xml (The requested operation cannot be performed on a file with a user-mapped section open)
ModelMapper
不属于标准的Spring Boot
器,因此我无法通过 Spring>Edit Starters 将其添加到pom.xml
如何添加非启动依赖项?
今天我发现了同样的问题。
如果您使用的是 IntelliJ,只需右键单击 pom.xml,然后单击 Maven,然后单击重新导入。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.