java - 如何在 spring-boot 项目中向 pom.xml 添加非 spring-boot 依赖项
问题描述
我有一个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
,因此我无法pom.xml
通过 Spring>Edit Starters添加它
如何添加非入门依赖项?
解决方案
今天我发现了同样的问题。
如果您使用 IntelliJ,只需右键单击 pom.xml,然后单击 Maven,然后重新导入。
推荐阅读
- javafx - 后台线程无论如何直接访问 UI
- ios - Swift 5 对继承的改变?
- php - 将 jquery ajax 与 php 一起使用时的会话问题
- android - Native project fails to build with error: Error configuring
- json - 在Textview和TableLayout中使用retrofit和rxjava2数据显示的json数据解析
- ffmpeg - 流式传输视频时是否真正连接字幕(HLS,M3U8)
- asp.net - IIS 中的 HTTP 到 HTTPS 重定向
- react-native - 按下硬件后退按钮后反应本机应用程序卡住
- primefaces - 如何覆盖 ap:confirmDialog 中的自定义严重性图标
- javascript - 为什么我的 javascript 代码没有执行并且说不是有效的 mime 类型?