Spring_配置WebMvcConfigurerAdapter出错

  在使用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>

 

 

  

posted @ 2018-05-21 22:12  学而时习之,不亦说乎?  阅读(465)  评论(0编辑  收藏  举报