spring-data-rest 相关问题

Spring Data REST(SDR)是一个Spring Data项目,旨在使Spring Data存储库作为REST服务公开。 SDR在内部使用Spring HATEOAS来创建HAL响应。

Spring Data REST中的关系和路径策略

在Spring Data REST 2.3中,选择存储库关系和路径的默认策略是复制和驼峰关联的实体名称。例如,ServiceInstance变为......

回答 1 投票 2

如何在处理ResourceNotFoundException时使用@ResponseStatus批注

我有以下服务类:@Service public class CitiesServiceImpl实现CitiesService {@Autowired private CitiesRepository citiesRepository; @Override public City getCityById(...

回答 1 投票 0

Spring Data Rest - Bean验证不适用于PUT方法?

我有一个域类定义如下@Data @Entity public class City {@Id @GeneratedValue(strategy = GenerationType.IDENTITY)@Column(name =“id”)private long cityID; @ ...

回答 2 投票 1

Sprint Data Rest是否支持开箱即用的列查询?

我有一个非常简单的例子,它使用Spring Data Rest和JPA来公开人员资源。启动应用程序时,它按预期工作,我可以POST和GET资源的实例。 ...

回答 1 投票 0

如何使用feign客户端反序列化application / json + hal消息?

我试图从我的db-service中反序列化我的application / json + hal消息,这是由Spring.io jpa-data-rest模块生成的,但是我无法将消息反序列化为我的...上的java模型...

回答 1 投票 0

如何找到Spring Data REST映射URI的目标存储库?

我正在使用MappedInterceptor实现一个Interceptor模式,如本文所述。拦截器按预期工作,它拦截@RestControllers作为Spring JPA Repositories ......

回答 1 投票 1

在另一个包中扫描存储库

我试图让我的Spring Boot应用程序(使用Spring Data REST)来发现在另一个包和项目中定义的Repository类。我想知道我是否可以配置应用程序来检测...

回答 1 投票 0

覆盖Spring Data Rest自动创建的存储库端点

我有一个Spring项目,其中spring-data-rest作为依赖项。我的项目中有很多存储库,spring-data-rest自动为其创建REST API端点。这适合我......

回答 1 投票 0

不明白为什么RepositoryRestController不起作用?

我使用Spring Data Rest,我无法理解为什么我的RepositoryRestController不起作用。其代码:@RepositoryRestController public class Cntrl {@Autowired private UserDao userDao; ...

回答 2 投票 0

Spring Interceptor无法在Spring Data REST URL中工作

我正在使用Spring Data Rest和JPA进行项目,我正在尝试配置HTTP拦截器。根据参考文档,可以在Spring Web MVC Docs - Handler Mapping Interceptor中找到,我......

回答 2 投票 5

如何防止从我的MongoRepository导出某些HTTP方法?

我正在使用spring-data-rest,我有一个像这样的MongoRepository:@RepositoryRestResource接口MyEntityRepository扩展了MongoRepository {}我想允许......

回答 2 投票 24

如何在QueryDSL 4中获取延迟集合

使用querydsl执行非常简单的查询时遇到以下问题。想象一下,我们有两个实体:CAR ---- <OWNERS我想执行查询,返回所有汽车和提取......

回答 2 投票 2

普通JSON(非HAL格式)的Spring Data REST

Spring Data Rest究竟应该如何配置为返回普通JSON而不是HAL(JSON与超媒体一样的链接)相关Spring在包含时以纯JSON而非HAL格式返回资源...

回答 2 投票 10

Spring Data Rest - 配置findBy路径

使用以下存储库:@RepositoryRestResource(collectionResourceRel =“people”,path =“people”)公共接口PeopleRepository扩展PagingAndSortingRepository {...

回答 2 投票 0

防止在Spring Data Rest中通过POST请求更新记录

我在Spring Boot应用程序中使用spring-data-rest,我注意到POST请求中有一种奇怪的行为。如果我向我的http://发出POST请求 / 终点与我...

回答 1 投票 0

Spring Data Rest - 设置请求超时

我有一个Visit实体,它通过ManyToOne关系引用Patient实体。访问的存储库是:@RepositoryRestResource(collectionResourceRel =“visits”,path =“visits”,...

回答 1 投票 0

Spring Data Rest with url of format / foo / {id} / bar

为了符合我们的内部标准,我们使用格式/ RESOURCE / {id} / COMPONENT尝试执行类似@RestResource(path =“/ RESOURCE / {id} / COMPONENT”)的URL public

回答 1 投票 1

如何在执行实体的CREATE操作时将实体关联放入JSON(在POST HTTP请求内)具有另一个实体的关联?

我使用Spring Boot作为我的后端框架,我有一个PERSON实体,它与GENDER实体有一对一的关系。我正在使用@RepositoryRestResource for PersonRepository和...

回答 1 投票 -1

JSR 303 Bean验证可以与Spring Data Rest一起使用吗?

我从文档http://docs.spring.io/spring-data/rest/docs/2.1.2.RELEASE/reference/html/validation-chapter.html了解到,我可以声明具有某些前缀的验证器。我正在使用JSR 303所以......

回答 4 投票 12

Spring Data REST - HAL浏览器 - 返回HAL浏览器HTML而不是API的根

我正在研究Spring Data REST,特别是HAL浏览器。我一直关注http://docs.spring.io/spring-data/rest/docs/current/reference/html/#_the_hal_browser上的文档。 ...

回答 3 投票 2

© www.soinside.com 2019 - 2024. All rights reserved.