An MediaType is created using a Spring bean with the following attributes:
Attribute | Value | Description |
---|---|---|
id | User-defined | A unique ID for the bean. |
parent | io.mediaType.factory.abstract | The parent bean. |
The MediaType bean takes the following properties:
Property | Type | Mandatory | Description |
---|---|---|---|
name | String | Required | The name to be used for the MediaType. |
label | String | Required | The label to be used for the MediaType. |
parent | MediaType | Optional | The MediaType parent. |
<bean id="css.mediaType" parent="io.mediaType.factory.abstract"> <property name="name" value="text/css" /> <property name="label" value="CSS stylesheet" /> <property name="parent" ref="text.mediaType" /> </bean>
To debug your MediaType, add the following entry to your
log4j.properties
file:
log4j.logger.com.componize.io.media.DefaultMediaTypeRegistry=debug