All my classes were working fine. Then I wanted to create main/resources
to add logback.xml
in main/resources
in my project
I
Only maven project automatically generate resource folder inside src, other solution would be put logbackback.xml
in src folder it ll work.
maybe you could created the new folder.Then,opening this object's properties and clicking 'Java Build Path'.Reelecting the source folder on build path.Just try,man!
To add a resource folder in eclipse:
Build Path
Configure Build Path
(or Properties
-> Java Build Path
)
Source Tab
Click on Add Folder
Create new Folder
Right Click your project -> Build Path -> New Source Folder and Type the name of the the resource folder you want to create like ----->src/main/resources or src/test/resources ..it will create a new resource folder
Since you're not using Maven, you shouldn't be creating the src/main/resources folder. Just put logback.xml in the src folder.
Also move your java files (with their entire package folder structure) back to src as they were before creating the main/resources.
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
*
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.