cut into the topic and see how today's errors happen:
First of all, this is my project path, Java is Sources root, resources is the resources root, put the required configuration file, where Hibernate configuration, the display is green, indicating no problem in eclipse, this is OK, It's no problem running. But in idea it's going to be a mistake.
caused by:org.hibernate.boot.MappingNotFoundException:Mapping (RESOURCE) not Found:xml/user.hbm.xml:origin (xml/ User.hbm.xml)
The hint is that the XML file is not found, but it can be run in the test class and think about whether it is a Tomcat pot.
PS: After testing remember to switch back to Tomcat, position click Switch, before stuck in this suspect life
The idea's Tomcat deployment location found that its files did not seem to be deployed in Tomcat,
There is no class, so open the idea point Open target folder, you can see the structure after deployment
As you can see, there is no configuration file under the domain folder in this structure
The configuration file is then placed under the Resources folder, and the package that contains the hibernate-mapping packages mapping class successfully resolves the issue.
Idea + SSH OA first day (hibernate:mapping (RESOURCE) not found)