How load xml files, in IntelliJ IDEA

2019-04-14 01:16发布

IntelliJ not find xml file under sources folder.

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

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

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

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

help me

1条回答
倾城 Initia
2楼-- · 2019-04-14 02:21

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

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

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.

查看更多
登录 后发表回答