我正在跟踪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
}
这里可能是什么问题?