File--project structrue- 在下面位置会发现所有需要依赖的包,然后右击,点击put into Output Root 重启之后发现war包里面有依赖的jar包了,之前只有controller包,所以报错找不到类