Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a src/main/resources directory?

Tags:

All my classes were working fine. Then I wanted to create main/resources to add logback.xml in main/resources in my project

I got help from "How to create main/java inside src"

But after creating the folders I am getting errors in all my classes, and the main folders were converted into packages

directory structure

How can I add the folder main/resources in my src folder?

Or is there any way to add logback.xml in any package in spring MVC?

like image 956
Kunal Batra Avatar asked Apr 28 '16 06:04

Kunal Batra


People also ask

How do I add resources to src test?

Right click on maven project --->Click on Build Path ----->Click on New Source Folder. New source folder window will open, give the name to your folder example - src/test/source. click on Finish.

What should I put in my src folder?

The /src folder is used to store the file with the primary purpose of reading (and/or editing) the code. The /src folder contains all the sources, i.e. the code which is required to be manipulated before it can be used.


1 Answers

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
  • like image 171
    Jad Chahine Avatar answered Oct 21 '22 20:10

    Jad Chahine