Sping:@EnableHypermediaSupport给出错误“在类ConverterRegisteringWebMvcConfigurer中没有定义0参数的构造函数”

时间:2019-04-04 11:00:55

标签: spring-boot spring-hateoas

我正在跟踪Spring Hateoas所在的mentioned文档:

  

要启用ResourceSupport子类型,请根据   各种超媒体表示类型的规范,支持   可以激活特定的超媒体表示格式   通过@EnableHypermediaSupport。

但是当我将@EnableHypermediaSupport添加到配置类中时,我在IDE的问题控制台中看到编译错误

  

没有在类中定义0个参数的构造函数   `org.springframework.hateoas.config.ConverterRegisteringWebMvcConfigurer'

@Configuration
@EnableWebMvc
@EnableHypermediaSupport(type = HypermediaType.HAL)
@ComponentScan(basePackages = {"com.api.web"})
public class WebConfig implements WebMvcConfigurer {

    public WebConfig() {
        super();
    }

    @Bean
    public PasswordEncoder passwordEncoder() {
        return new BCryptPasswordEncoder();
    }
//other beans
}

这里可能是什么问题?

0 个答案:

没有答案