Kunal Batra Kunal Batra - 7 months ago 37
Java Question

How to create a src/main/resources directory in eclipse?

My all classes were working fine i wanted to create main/resources for adding logback.xml in main/resources in my project

i got help from below link

How to create main/java inside src

but after creating folders i am getting all errors in my class

and main folders converted into packages

directory structure

how can i add folder main/resources in src folder?

or is there any way to add logbackback.xml in any package in spring mvc?

Answer

To add a resource folder in eclipse:

  • Click on Build Path

  • Click on Configure Build Path

    (or Properties -> Java Build Path)

  • Click on Source Tab

    enter image description here

    Click on Add Folder

    enter image description here

  • Click on Create new Folder

  • Comments