Basic Usage
Signature
Configuration Options
Required Properties
| Property | Type | Description |
|---|---|---|
name | string | Unique resource identifier |
uriTemplate | string | RFC 6570 URI template |
Optional Properties
| Property | Type | Description |
|---|---|---|
title | string | Human-readable title |
description | string | Resource description |
mimeType | string | MIME type for all matching resources |
icons | Icon[] | Icons for display |
URI Template Syntax
Templates follow RFC 6570 Level 1:Parameter Extraction
Parameters are extracted automatically and passed toexecute():
Function-Based Alternative
vs Static Resource
| Feature | @Resource | @ResourceTemplate |
|---|---|---|
| URI | Fixed | Template with parameters |
| Params | None | Extracted from URI |
| Use case | Single resource | Collection/dynamic resources |
Full Example
Related
@Resource
Static resources
ResourceContext
Context class details
ResourceRegistry
Resource registry API
Resource Errors
Resource-related errors