在调试启动maven项目时报406错误,The resource identified by this request is only capable of generating responses

欢迎加入JavaWeb开发交流群:群号:1062758224
在调试启动maven项目时报406错误:The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request “accept” headers.如图:
在调试启动maven项目时报406错误,The resource identified by this request is only capable of generating responses
在网上搜了好久也没找错解决办法,后来自己摸索,发现是自己的pom.xml文件中多写了<dependencyManagement> </dependencyManagement>
如图:
在调试启动maven项目时报406错误,The resource identified by this request is only capable of generating responses
只需将<dependencyManagement> </dependencyManagement>去掉即可
在调试启动maven项目时报406错误,The resource identified by this request is only capable of generating responses
再次测试项目,发现不再报错。