-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Paul Warren
committed
Feb 4, 2019
1 parent
b876ad5
commit b4063c3
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
== Changing the Base URI | ||
By default, Spring Content REST serves up REST resources at the root URI, '/'. | ||
|
||
With Spring Boot 1.2 and later versions, you can change the base URI by setting a single property in application.properties, as follows: | ||
|
||
==== | ||
[source, java] | ||
---- | ||
spring.content.rest.baseUri=/api | ||
---- | ||
==== | ||
|
||
Or if you are not using Spring Boot, you can do the following: | ||
|
||
==== | ||
[source, java] | ||
---- | ||
@Configuration | ||
class CustomContentRestMvcConfiguration { | ||
@Bean | ||
public ContentRestConfigurer contentRestConfigurer() { | ||
return new ContentRestConfigurer() { | ||
@Override | ||
public void configure(RestConfiguration config) { | ||
config.setBaseUri(URI.create("/contentApi")); | ||
} | ||
}; | ||
} | ||
} | ||
---- | ||
==== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters