[IDEA] Directory creates the correct way to write multi-level directories

When creating a package under resource, there is no Package when right-clicking resource+new, only Directory

We can also use Directory to create a package, but the way of writing is different from the way of creating a package under Package

For example:

Create package in directory

 while we were looking at the files

 If you use (com.dao.mapper) to create a package, there will be no multi-level directory, which is equivalent to com.dao.mapper.

package name

Correct way of writing:

(com/dao/mapper)

 Using (com/dao/mapper) will generate a multi-level directory

In this way, the multi-level directory can also be displayed in the compiler

Notice:

If the package is created in the directory, if the wording is wrong, the file cannot be found when running the project

The following is the problem I encountered when running a project https://blog.csdn.net/m0_67930426/article/details/131364734?spm=1001.2014.3001.5501

Guess you like

Origin blog.csdn.net/m0_67930426/article/details/131364387