NotesontheText.什么意思?我也碰到了这个问题,这是因为hibernate版本问题,hibernate 5.xx获得sessionFactory发生了变化,见这个hibernate5.x.x 使用mapping resource 不起作用