在使用Java配置SpringMVC时出错:The type org.springframework.http.converter.HttpMessageConverter cannot be resolved. It is indirectly referenced from required .class files。
问题原因:缺少必要的jar包
解决方案:在pom中导入如下配置
<!-- https://mvnrepository.com/artifact/org.springframework/spring-web --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>4.1.1.RELEASE</version> </dependency>