首先在自己的项目中,选择引用的spring包,hibernate包,右键,选择properties——>Java Source Atribute ——>

External File  然后在相同版本的spring包,hibernate包中选择src文件夹中相同名称的jar包,点打开,点OK