Element 'dependencies' cannot have character[children],because the type's content type is elemen


問題描述:

Element 'xxxxxxx' cannot have character [children],because the type's content type is element-only

原因:

配置文件中的beans節點下面只能是元素節點,不能有字符或文本存在。

比如多余的標點符號,點,也有可能是空格。

解決:

將配置文件之間的空格刪掉,有時候眼睛看着明明沒有什么問題,但是刪掉就沒有問題了。。。。

類似於:

<plugin> <groupId> org.apache.maven.plugins </ groupId> <artifactId> maven-shade-plugin </ artifactId> <version> 1.2.1 </ version> <executions> <execution> <phase> package < / phase> <goals> <goal> shade </ goal> </ goals> <configuration> <transformers> <transformer implementation =“org.apache.maven.plugins.shade.resource.ManifestResourceTransformer”> <mainClass> com.cloume .project.App </ mainClass> </ transformer> </ transformers> </ configuration> </ execution> </ executions> </ plugin>

最后option+command+L回復格式就行了。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM