Interface ResourceMinimizer
- All Known Implementing Classes:
MasterResourceMinimizer
Certain kinds of resources can be minimized: this primarily refers to JavaScript and CSS, both of which contain
whitespace, comments and other features that can be reduced.
The service configuration maps a MIME content type (e.g., "text/javascript") to an appropriate implementation of this
interface. The master service has the @
Primary
marker interface.- Since:
- 5.3
-
Method Summary
Modifier and TypeMethodDescriptionminimize
(StreamableResource resource) Checks the content type of the resource and applies an appropriate minimization to it if possible.
-
Method Details
-
minimize
Checks the content type of the resource and applies an appropriate minimization to it if possible.- Parameters:
resource
- to minimize- Returns:
- the same resource, or a minimized replacement for the resource
- Throws:
IOException
-