spring-framework / org.springframework.web.servlet.resource / ResourceResolverChain / resolveUrlPath

resolveUrlPath

@Nullable abstract fun resolveUrlPath(resourcePath: String, locations: MutableList<out Resource>): String

Resolve the externally facing public URL path for clients to use to access the resource that is located at the given internal resource path.

This is useful when rendering URL links to clients.

Parameters

resourcePath - the internal resource path

locations - the locations to search in when looking up resources

Return
the resolved public URL path, or null if unresolved