The essence of the problem is that idea's regulations on classpath.
In eclipse, put the resource file in the src folder, it can be found;
However, in the idea, the resource file is directly placed in the src folder. If it is not set, it cannot be found .
solution:
1.Project Structure -> Modules -> Sources -> select the package containing the configuration file -> Mark as -> select the third Resources -> OK
2. Add dependent jar packages
3. If you start Tomcat and report the error message as shown below
Modify the paths as shown below