need to restructure the filesctructure in springboot project

it is now a package but want it to be folders just like in my old project so i can place folders there
37 Replies
JavaBot
JavaBot•5d ago
āŒ› This post has been reserved for your question.
Hey @Timo! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
Timo
TimoOP•5d ago
No description
Timo
TimoOP•5d ago
basically want the new project (left) to have the same filestructure as the right so i can create folders for dao models controllers etc
dan1st
dan1st•5d ago
a package with the name a.b.c is a folder a with a folder b with a folder c
Timo
TimoOP•5d ago
yeah but shouldn t it be like the old project otherwise i have a ton of packages
dan1st
dan1st•5d ago
So on the right, you have a package com.example.todoappdeel3 but IntelliJ is just not loading it properly
ayylmao123xdd
ayylmao123xdd•5d ago
i say do whats the name for that package setup functionality based setup
dan1st
dan1st•5d ago
just create packages as you like?
ayylmao123xdd
ayylmao123xdd•5d ago
so u got for example book and in the book package u keep bookcontroller bookservice etc
Timo
TimoOP•5d ago
but there are folders in there like dto etc and not packages like when i try on the left can also do that with a folder?
dan1st
dan1st•5d ago
these folders are just packages - IntelliJ just doesn't display it properly and you can create nested packages
Timo
TimoOP•5d ago
but is my intellij on weed then today? cuz seems to be doing everything wrong lol
dan1st
dan1st•5d ago
I think it's just the project not loaded correctly
Timo
TimoOP•5d ago
but i rebuild it?
ayylmao123xdd
ayylmao123xdd•5d ago
yea
Timo
TimoOP•5d ago
No description
ayylmao123xdd
ayylmao123xdd•5d ago
because you seem to have the
Timo
TimoOP•5d ago
did that alr
ayylmao123xdd
ayylmao123xdd•5d ago
you are actually opening a folder within the folder and then opening the actual project
dan1st
dan1st•5d ago
The project on the left seems perfectly fine
ayylmao123xdd
ayylmao123xdd•5d ago
if im understanding it right yea but on the right or wait whats your goal again
Timo
TimoOP•5d ago
but what is the advantage of a package over a folder cuz then i have the com example backend and dto package controller package etc instead of just folders
ayylmao123xdd
ayylmao123xdd•5d ago
so thats the way of intellij shortening it
dan1st
dan1st•5d ago
packages are just folders
ayylmao123xdd
ayylmao123xdd•5d ago
if you put something in the com folder it would be shown as separate
dan1st
dan1st•5d ago
open it in the file explorer of your OS and you'll see
ayylmao123xdd
ayylmao123xdd•5d ago
vice versa for any other folder
Timo
TimoOP•5d ago
but like 1/1 or is there a differnece?
dan1st
dan1st•5d ago
packages are folders that Java understands
Timo
TimoOP•5d ago
only java? or any other programming langueges too?
dan1st
dan1st•5d ago
packages are specific to the JVM other languages may have similar concepts or even other things with the same name though
Timo
TimoOP•5d ago
okay lol weird but atleast i know for now in my old project intellij all showed them as folders XD
dan1st
dan1st•5d ago
As I said, I think IntelliJ didn't properly load it
ayylmao123xdd
ayylmao123xdd•5d ago
i think cuz the project was within an open folder like it says luxury products backend twice 😱
Timo
TimoOP•5d ago
yeah it is on weed lol anyway thanks for the help can i just use !close
JavaBot
JavaBot•5d ago
If you are finished with your post, please close it. If you are not, please ignore this message. Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
JavaBot
JavaBot•5d ago
Post Closed
This post has been closed by <@591288621345275915>.

Did you find this page helpful?