Where is the correct location to put Log4j.properties in an Eclipse project?

后端 未结 10 1611
伪装坚强ぢ
伪装坚强ぢ 2020-11-27 11:19

Where in my Eclipse project should I add the log4j.properties file so that it will work as intended?

10条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-27 12:15

    The best way is to create special source folder named resources and use it for all resource including log4j.properties. So, just put it there.

    On the Java Resources folder that was automatically created by the Dynamic Web Project, right click and add a new Source Folder and name it 'resources'. Files here will then be exported to the war file to the classes directory

提交回复
热议问题