Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs update #906

Merged
merged 1 commit into from
May 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions spring-content-rest/src/main/asciidoc/rest-store.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -333,21 +333,23 @@ All content types except `application/json`

== The Entity Resource

Requests to `Store Resource` exists (partially) in the same URL space as Spring Data's Entity Resource.
For example, "shortcut" requests to `/{store}/{id}` will return content (or 404 is no content is set)
instead of the entity's json.
Requests to `Store Resource` exist (partially) in the same URL space as Spring Data's Entity Resource.
When a single piece of content is associated with an entity then "shortcut" requests to `/{store}/{id}`
will return content (or 404 if no content is set) instead of the entity's json.

This behavior can be customized by preventing the Store Resource from responding to shortcut requests
with certain media types using exclusions, or by completely disabling the Store Resource for all shortcut
requests.
with certain media types using exclusions, or by completely disabling the Store Resource from responding
to all shortcut requests, forcing full qualified requests only. Note, this is likely to become the default
in future versions of Spring Content REST.

With Spring Boot 1.2 and later, you can customize the exclusions by setting the following property in
application.properties:
With Spring Boot 1.2 and later, you can customize the exclusions or disable shortcut requests entirely by
setting either of the following properties in application.properties:

====
[source, java]
----
spring.content.rest.shortcut-request-mappings.excludes=<VERB>=<MEDIA_TYPE>[,<MEDIA_TYPE>][:<VERB>=<MEDIA_TYPE>[,<MEDIA_TYPE>]]
spring.content.rest.shortcut-request-mappings.excludes=<VERB>=<MEDIA_TYPE>[[,<MEDIA_TYPE>]:<VERB>=<MEDIA_TYPE>[,<MEDIA_TYPE>]]

spring.content.rest.shortcut-request-mappings.disabled=true|false
----
where:
Expand Down