1. When using idea to create a new project, select the spring category on the left and the sub-category on the right, and use it to generate the Web. XML, Dispatcher-servlet.xml, Applicationcontext.xml and even hibernate.cfg.xml. But after the new is done, it is recommended to add Framework:maven, do not use those spring libraries, because there will be a potential jar library incompatibility problem. For example, some version of spring data in the curdrepository of the Save interface function and some spring data JPA jparepository in the Save interface function prototype inconsistent, resulting in a compilation error.
2. File->project structure in the artifacts to be aware of the need to add the jar to the/web-inf/lib to avoid the occurrence of the package is not found;
3. It is important to check the package compatibility that is introduced by Pom, as long as there are no packages to find, no functions to find, etc.
Use IntelliJ idea to create a spring/springmvc/hibernate project when you step on the pit