Skip to content

Annotation reference

Every annotation and option, with its default and current status. Package: com.substringtechnologies.jpaadmin.annotations.

Supported works as described · Partial works with limits noted · Not yet accepted but has no effect yet

@AdminResource

On an entity class. Controls how the entity appears and what can be done with it.

Option Type Default Status Description
displayName String class name, humanized Supported Singular name ("New Product").
pluralName String display name + "s" Supported Sidebar and page title.
group String "General" Supported Sidebar and dashboard group.
icon String "database" Supported A Lucide icon name such as shopping-cart. With the default, an icon is chosen from the entity name.
order int 100 Supported Position within the group, lowest first.
readOnly boolean false Supported View only. Enforced by the API.
creatable boolean true Supported Allow creating records. Enforced by the API.
updatable boolean true Supported Allow editing. Enforced by the API.
deletable boolean true Supported Allow deleting. Enforced by the API.
exportable boolean true Supported Show the CSV Export button.
defaultSortBy String "id" Supported Field the table is sorted by initially.
defaultSortDir SortDir DESC Supported ASC or DESC.
pageSize int 25 Supported Initial rows per page.
hidden boolean false Supported Exclude the entity from the console and API.

@AdminField

On an entity field.

Option Type Default Status Description
label String field name, humanized Supported Column, form and detail label.
description String "" Supported Help text under the form input; tooltip on the record page.
placeholder String "" Supported Input placeholder.
order int 100 Supported Position in tables, forms and record pages (the ID is always first).
inList boolean true Supported Show as a table column.
inForm boolean true Supported Show in create and edit forms.
inDetail boolean true Supported Show on the record page.
readOnly boolean false Supported Display only; ignored in update requests.
searchable boolean false Supported Include in the table search (text fields). If no field is searchable, all text fields are searched.
sortable boolean true Supported Allow sorting by this column.
filterable boolean false Supported Add to the Filter panel (text, enum, boolean, relation, number range, date range).

@AdminWidget

On a field. Chooses the input control.

Option Type Default Status Description
type WidgetType AUTO Partial See the widget table below.
min, max, step double — Not yet Use @Min / @Max for numeric limits.
language String "json" Not yet The code editor has no language-specific highlighting yet.
previewSize String "48px" Not yet —
WidgetType Status Renders as
AUTO Supported Chosen from the Java type
TEXT Supported Single-line input
TEXTAREA Supported Multi-line input
RICH_TEXT Supported Formatting editor; HTML is sanitized on display
CODE_EDITOR Supported Editor with line numbers
COLOR_PICKER Supported Color picker plus hex input; swatch in tables
IMAGE_URL Supported URL input; image preview in tables and on record pages
PASSWORD Supported Masked input with reveal
BOOLEAN_SWITCH Supported Switch
DATE_PICKER, DATE_TIME_PICKER Partial Same as AUTO: date fields already get native pickers
SLIDER Not yet Rendered as a number input
FILE_UPLOAD Partial Use @AdminUpload, which sets this automatically

@AdminUpload

On a String field that stores the uploaded file's URL. See File & image uploads.

Option Type Default Status Description
storage String "default" Supported Name of a storage under spring.jpa.admin.storage. Startup fails if it isn't configured.
folder String "" Supported Key prefix. Files are stored as folder/yyyy/MM/<random>-<name>.<ext>.
accept String[] PNG, JPEG, WebP, GIF Supported Allowed MIME types; image/* wildcards work. SVG only when image/svg+xml is listed.
maxSize String "5MB" Supported 500KB, 10MB, 1GB or a byte count.

@AdminBadge and @BadgeMap

On an enum or string field. Maps values to colored badges.

Option Type Default Status Description
@AdminBadge.mapping BadgeMap[] {} Supported One entry per value.
@BadgeMap.value String — (required) Supported Stored value, case-insensitive.
@BadgeMap.color BadgeColor DEFAULT Supported DEFAULT, PRIMARY, BLUE, GREEN, YELLOW, RED, PURPLE, INDIGO, PINK, GRAY.
@BadgeMap.label String "" Supported Text shown in the badge.

@AdminLookup

On a relation field.

Option Type Default Status Description
lookupProperty String "" Supported Property used as the related record's label.
searchProperty String "" Not yet The picker searches the target's name-like field and ID.
quickCreate boolean false Not yet Creating a related record from the picker isn't available yet.

@AdminInline

On a @OneToMany or @ManyToMany collection.

Option Type Default Status Description
title String field name, humanized Supported Section and tab title.
canAdd boolean true Supported Allow adding rows. Enforced by the API.
canDelete boolean true Supported Allow removing rows. Enforced by the API.
limit int 50 Supported Maximum rows. Enforced by the API.
type InlineType TABULAR Partial STACKED currently renders as a table too.

Editable only for @OneToMany(mappedBy = …). Many-to-many inlines are read-only.

@AdminAction

On an entity method. See Custom actions.

Option Type Default Status Description
name String — (required) Supported Menu and button label.
confirmation String "" Supported When set, asks for confirmation with this message.
scope ActionScope BOTH Supported SINGLE_ROW, BULK_SELECTION or BOTH. Controls where the action appears.
icon String "zap" Partial Returned in metadata; the console shows a standard action icon.

@AdminComputed

On a no-argument getX() / isX() method.

Option Type Default Status Description
label String property name, humanized Supported Column and detail label.
order int 100 Supported Position.
inList boolean true Supported Show as a column.
inDetail boolean true Supported Show on the record page.
format String "" Not yet Values use the standard formatting.

@AdminSensitive

On a field. Masks the value in responses, hides it from tables, and uses a masked input.

Option Type Default Status Description
(marker) Supported Fields named like password or secret are treated as sensitive automatically.
mask boolean true Not yet Sensitive values are always masked.
maskPattern String "••••••••" Not yet The mask is always ••••••••.

@AdminPermission

On an entity class.

Option Type Default Status Description
roles, createRoles, readRoles, updateRoles, deleteRoles String[] {} Not yet Exposed in metadata but not enforced. The console has a single admin account; see Security.

Enums

Enum Values
SortDir ASC, DESC
ActionScope SINGLE_ROW, BULK_SELECTION, BOTH
InlineType TABULAR, STACKED
BadgeColor DEFAULT, PRIMARY, BLUE, GREEN, YELLOW, RED, PURPLE, INDIGO, PINK, GRAY
WidgetType AUTO, TEXT, TEXTAREA, RICH_TEXT, COLOR_PICKER, SLIDER, CODE_EDITOR, DATE_PICKER, DATE_TIME_PICKER, FILE_UPLOAD, IMAGE_URL, PASSWORD, BOOLEAN_SWITCH