Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding a sub-directory to the static directory in an IntelliJ Spring Boot project renames it?

I am new to IntelliJ and I am using it to create a Spring Boot application. I have the following project structure:

Original Project Structure

I need to create a "css" directory underneath the "static" directory underneath the "resources" directory, so I can put in there the CSS files I want to use in my Thymeleaf web page templates.

I then tried to add a "css" sub-directory by right-clicking on the "static" directory and using the New -> Directory dialog. Instead of ending up with a sub-directory called "css" under "static", it renamed "static" to "static.css", as shown below.

After adding new sub-directory

Given the little dot on the folder icons, it almost feels like IntelliJ is treating those folders as Java packages instead of actual file folders. What is the proper way with IntelliJ to create a sub-directory under the "static" directory?

like image 233
Robert Oschler Avatar asked Aug 04 '17 21:08

Robert Oschler


1 Answers

You're creating in a right way, but Intellij is showing in its way. Just click the gear icon next to minimize icon. And uncheck Compact Empty Middle Packages. It should show in a tree format.

Menu

like image 83
Jama A. Avatar answered Oct 13 '22 03:10

Jama A.