pom.xml 问题:Element 'dependencies' cannot have character[children],because the type's content type is elemen

原因:配置文件中的dependencies节点下面只能是元素节点,不能有字符或文本存在。比如多余的标点符号,也有可能是空格(可能肉眼看不出来)。

解决方法:就是把空格全部删掉

例如这样:

<dependency><groupId>org.apache.tomcat.embed</groupId><artifactId>tomcat-embed-jasper</artifactId></dependency>

 

然后idea 快捷键(ctrl+alt+L)格式化就行

<dependency>

<groupId>org.apache.tomcat.embed</groupId>

<artifactId>tomcat-embed-jasper</artifactId>

</dependency>

GitHub 加速计划 / de / Dependencies
39
1
下载
A rewrite of the old legacy software "depends.exe" in C# for Windows devs to troubleshoot dll load dependencies issues.
最近提交(Master分支:2 个月前 )
1997a400 - 3 年前
2f423539 - 3 年前
Logo

新一代开源开发者平台 GitCode,通过集成代码托管服务、代码仓库以及可信赖的开源组件库,让开发者可以在云端进行代码托管和开发。旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐