可能是jar包冲突,在eclipse中打开pom.xml看Dependency Hierarchy视图,挨个点击右侧Resolved Dependencies视图中的jar,看左侧Dependency Hierarchy中的jar是否有omitted for conflict with ……的字样,如果有,右键点击omitted for conflict with ……所在的行,选择Exclude Maven Artifact项,再点OK排除该冲突包。这种方式会把冲突的两个包都排除掉,如果想留下来其中一个,那么查看下pom.xml中的代码,把你想留下来的那个包的屏蔽代码删掉