Annotation Interface CrudCrafted
Annotation to mark a class as a CrudCrafted entity. When applied,
CrudCraft will generate a complete CRUD implementation for the entity.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionIf set, all the generated code (dtos, repos, services, controllers, etc.) will be rooted at this package instead of the entity's own package.boolean
When true, we generate a concrete stub extending the abstract base (once).Class
<? extends CrudEndpointPolicy> Used for user-defined policies that can be used to control which endpoints are generated.Used for generating additional code.Used for omitting endpoints that are not needed, but are included in the specified template.boolean
Toggle table/endpoint security.Class
<? extends CrudSecurityPolicy> The table-level security policy to use for generating @PreAuthorize expressions.The CrudTemplate to use for generating endpoints.
-
Element Details
-
editable
boolean editableWhen true, we generate a concrete stub extending the abstract base (once).- Default:
false
-
basePackage
String basePackageIf set, all the generated code (dtos, repos, services, controllers, etc.) will be rooted at this package instead of the entity's own package.- Default:
""
-
template
CrudTemplate templateThe CrudTemplate to use for generating endpoints. Defaults to FULL, which generates all CRUD operations.- Default:
FULL
-
omitEndpoints
CrudEndpoint[] omitEndpointsUsed for omitting endpoints that are not needed, but are included in the specified template.- Default:
{}
-
includeEndpoints
CrudEndpoint[] includeEndpointsUsed for generating additional code. This can be used to add endpoints that are not part of the specified template.- Default:
{}
-
endpointPolicy
Class<? extends CrudEndpointPolicy> endpointPolicyUsed for user-defined policies that can be used to control which endpoints are generated.- Default:
nl.datasteel.crudcraft.annotations.CrudTemplate.class
-
secure
boolean secureToggle table/endpoint security. Whenfalse
, no @PreAuthorize wrappers are generated.- Default:
true
-
securityPolicy
Class<? extends CrudSecurityPolicy> securityPolicyThe table-level security policy to use for generating @PreAuthorize expressions.- Default:
nl.datasteel.crudcraft.annotations.security.policy.PermitAllSecurityPolicy.class
-