Questions tagged «spring-hateoas»

4
何时使用@RestController与@RepositoryRestResource
我一直在研究如何在REST中使用Spring的各种示例。我们的最终目标是HATEOAS/HAL安装Spring 我已经看到了两种在Spring中渲染REST的不同方法 通过@RestController控制器内 通过@RepositoryRestResource存储库中 我在努力寻找的是为什么您会使用一个而不是另一个。尝试实施HAL哪种方法最好? 我们的数据库后端是Neo4j。

10
Spring Boot 2.2.0 Spring HateOas启动问题
我将项目从Spring Boot 2.1.9迁移到了2.2.0。在启动项目时,面临以下error消息。 可能造成的原因,也不hateoas在我的pom.xml文件中使用。 Caused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'org.springframework.plugin.core.PluginRegistry<org.springframework.hateoas.client.LinkDiscoverer, org.springframework.http.MediaType>' available: expected single matching bean but found 17: modelBuilderPluginRegistry,modelPropertyBuilderPluginRegistry,typeNameProviderPluginRegistry,syntheticModelProviderPluginRegistry,documentationPluginRegistry,apiListingBuilderPluginRegistry,operationBuilderPluginRegistry,parameterBuilderPluginRegistry,expandedParameterBuilderPluginRegistry,resourceGroupingStrategyRegistry,operationModelsProviderPluginRegistry,defaultsProviderPluginRegistry,pathDecoratorRegistry,apiListingScannerPluginRegistry,relProviderPluginRegistry,linkDiscovererRegistry,entityLinksPluginRegistry Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'linkDiscoverers' defined in class path resource [org/springframework/hateoas/config/HateoasConfiguration.class]: Unsatisfied dependency expressed through method 'linkDiscoverers' parameter 0; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.