DATAREST-1540 - Improvements in HandlerMapping implementation for Spring 5.3.
We now use Spring's path prefix capabilities to apply Spring Data REST's base path to its mappings. This was previously implemented by tweaking the matching conditions. We now also pick up Spring 5.3's PathPatternParser and apply that to the custom HandlerMapping implementations we register. Moved DelegatingHandlerMapping into the configuration package to be able to keep it around in package scope. Deprecated RepositoryRestConfiguration.getBaseUri() as we have only supported paths for quite a while now. Moved all client code to ….getBasePath() instead.
This commit is contained in:
@@ -51,7 +51,7 @@ import org.springframework.web.servlet.config.annotation.CorsRegistration;
|
||||
@SuppressWarnings("deprecation")
|
||||
public class RepositoryRestConfiguration {
|
||||
|
||||
private static final URI NO_URI = URI.create("");
|
||||
static final URI NO_URI = URI.create("");
|
||||
|
||||
private URI baseUri = NO_URI;
|
||||
private URI basePath = NO_URI;
|
||||
@@ -109,7 +109,9 @@ public class RepositoryRestConfiguration {
|
||||
* The base URI against which the exporter should calculate its links.
|
||||
*
|
||||
* @return The base URI.
|
||||
* @deprecated use {@link #getBasePath()} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public URI getBaseUri() {
|
||||
return basePath != NO_URI ? basePath : baseUri;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user