How to create a src/main/resources directory?

The same problem I also encountered while I was learning the spring boot wanted to add logback.xml in resources. I am using sts for spring boot. As of my understanding, there are two things your file system folder structure and another sts folder structure. First I created a folder in your file system at src/main/ and then add this folder into build path. *


For creating a folder follow below image 1,2 and 3

* image 1

image 2

image 3

Now at the final step, add newly added resource folder into the build path. by clicking properties or directly build path button. Click on source tab and then click on add folder and browse the resources folder and add that's all. See below image for more description and help. image 4


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
  • Tags:

    Java

    Eclipse