如何在IntelliJ IDEA中加载xml文件 [英] How load xml files, in IntelliJ IDEA

查看:3529
本文介绍了如何在IntelliJ IDEA中加载xml文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

IntelliJ找不到sources文件夹下的xml文件。

IntelliJ not find xml file under sources folder.

示例)src / net / saltfactory / domain / PersonSqlMap.xml

example) src/net/saltfactory/domain/PersonSqlMap.xml

但是,如果我复制它并过去文件夹,IntelliJ找到xml文件

but, If I copy it and past out folder, IntelliJ find xml file

例子)out / net / saltfactory / domain / PersonSqlMap.xml

example) out/net/saltfactory/domain/PersonSqlMap.xml

我希望不要将XML文件复制并过去到文件夹

I hope that don't copy and past XML files to out folder

帮助我

推荐答案

首先,确保在模块设置中将 src 标记为模块的源文件夹 - - >模块 - > - >来源。

First, make sure src is marked as a source folder for your module in Module Settings --> Modules --> --> Sources.

其次,确保已识别资源列表包含一个XML文件(?*。 xml
设置 - >项目 - >编译器 - >资源设置。

Second, make sure the list of recognized resources includes one for XML files (?*.xml) in Settings --> Project --> Compiler --> Resource Settings.

这是IntelliJ知道什么的除了类文件之外,还要复制到类路径(输出文件夹)中。如果这没有帮助,请提供更多信息。

This is how IntelliJ knows what to copy into your classpath (output folder) in addition to class files. If this doesn't help, please provide more information.

这篇关于如何在IntelliJ IDEA中加载xml文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆