Advanced β
This chapter covers Erupt's advanced usage and extension development, helping you tackle more complex business scenarios in real-world projects.
DataProxy13
DataProxy OverviewInject custom business logic at every CRUD stageCRUD InterceptionInject business logic around add, update, and delete via before* / after*Form ValidationValidate data before saving via validate, reject on failureQuery ConditionsbeforeFetch condition injection and default search valuesTable DisplayCell coloring, row-button control, custom content injectionCustom RowsAppend totals and summary rows via extraRowVirtual FieldsDisplay and populate non-database fields via @TransientForm BehaviorsPre-process data when forms open via addBehavior / editBehaviorForm ViewRender an Erupt class as a full-page form, ideal for settings pagesExcel Import & ExportCustomize export files and validate imported data via excel*Print ProcessingCustomize the printed HTML output via printInherited ProxyReuse DataProxy capabilities through inheritance via @PreDataProxyGlobal InterceptionPostDataProxy intercepts data operations globally, no per-class config
EruptDao Database Operations3
EruptDao OverviewJPA-based data operations: CRUD and native SQLChained QueriesStrongly-typed LambdaQuery: aggregation, pagination, associationsMulti-Datasource OperationsRun queries against a specific data source via getEntityManager
Data Sources & Persistence3
Multiple Data SourcesConfigure and use multiple databasesCustom Data SourceManage non-database data with EruptSoft DeleteReplace physical deletion with a deleted flag field
Login & Security3
Login & AuthenticationCustom login logic, token validation, permission extensionCustom Login PageCaptcha login, WeChat QR login and other custom login flowsOpen APIToken via appid + secret for external system calls
API & Integration3
API Development & LogsCustom REST endpoints and operation-log recordingExisting Project IntegrationPlug Erupt into an existing Spring Boot projectFrontend/Backend SeparationBuild and deploy the frontend independently, backend serves API only
UI & Interaction3
Frontend NotificationsTrigger frontend messages and dialogs from the backendCustom File UploadIntegrate OSS, local storage, or any custom upload backendInternationalizationMultilingual support and custom translations
Development & Extension5
Event ListenersListen to internal framework events for decoupled extensionHot BuildAnnotation changes apply on page refresh, no restart neededUtility ClassesErupt's built-in utility classesExtending Erupt AnnotationsBuild on the Erupt annotation systemPlugin DevelopmentBuild custom plugins on top of the framework