hibernate.cfg.xml 文件里的<mapping resource="com\\test\\user\\User.hbm.xml"> 标签所对应的映射文件 *.hbm.xml 如果跟 hibernate.cfg.xml 不在同一目录下,可以采取以上写法。