【发布时间】:2016-09-14 16:01:10
【问题描述】:
我有多个 spring 存储库,一个用于我数据库中的每个表。在 application.properties 中使用 @EnableJpaRepositories(basePackage = "com.company.repositories") 和 spring.data.rest.base-path=/api 我现在有了一个基于 json 的完整 REST api。
我可以在 JSON 对象的帮助下发布到 /api/customers、PATCH 等。
当我在资源上使用 GET 并在表单使用 PUT、POST 等提交数据时处理 application/x-www-form-urlencoded 时,有没有办法告诉 Spring 呈现 html 表单而不是 json 对象?
【问题讨论】:
标签: java rest spring-data-rest