hi,
i am implementing a 'FilesystemResource extends AbstractResource' for a
tap-jira ticket.
the contract for toUrl() says:
return URL or null, if resource does not exist.
this contract is fine for application bundled assets
(context+classpath), but in my view not for outside-application
maintained artifacts (like filesystem files). non-existent files in
filesystem should not break the page but rather return a 404 when it is
accessed from the browser. further more deploying filesystem artifacts
and webapp are often distinct steps and should therefore be decoupled.
but breaking this toUrl() contract would also break automatic failover
if localized assets don't exist (the failover to non-localized asset is
using the null-return information). maybe we can change the
asset-localization failover and make it explicit inside
module-configuration (enable/disable asset localization).
we will come across the same problem when providing an URL alias asset
(which could point to a CDN).
what do you think?
--
manuel aldana
[email protected]
software-engineering blog: http://www.aldana-online.de
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]