Skip to main content

v5.0.0 (2026-10-05)

<dependency>
<groupId>net.hasor</groupId>
<artifactId>dataway-embedded</artifactId>
<version>5.0.0</version>
</dependency>

5.0.0 rebuilds Dataway around an independent core, framework adapters, metadata providers, and a replaceable console.

Changes​

Dataway rewrite​

  • Decoupled the core from Hasor. DatawayConfig holds configuration and Dataway creates services. Spring, Solon, and Hasor adapters integrate with their host containers and Web lifecycles.
  • Separated business APIs, management APIs, console resources, and documentation into four Web handlers with configurable paths. Business API, management, and documentation endpoints are enabled as needed.
  • Separated management from execution. AdminService manages drafts, state, publication, disabling, deletion, and history. ApiService lets Java code invoke published, enabled APIs by HTTP method and path or API ID.
  • Retained drafts, published snapshots, and history, with added revision conflict checks and atomic batch writes. Routes are identified by method and path; draft changes take effect externally after publication.
  • Rebuilt authorization: applications handle login, IdentityProvider supplies identities, and AuthorizationCheck checks operations. Preset identities provide no access, API access, read-only console access, or full administration.
  • Replaced execution extensions with AdminInterceptor and ApiInterceptor, supporting before/after processing, exception handling, and short-circuit returns. Contexts expose targets, operations, and identities; API interceptors also distinguish HTTP, debugging, and Java calls.
  • Unified API execution, console debugging, and Java invocation through DatawayEngine and DatawayQuery for parameter preparation, script execution, and result processing.

Metadata and transactions​

  • Separated JDBC and Nacos providers into dataway-meta-jdbc and dataway-meta-nacos. Applications select storage through ApiDataAccessLayer.
  • Added table, field, and Nacos entity name mappings to DatawayConfig. SCRIPT stores the original script; SQL scripts are compiled as fragments when queries are created.
  • Provided schema scripts for MySQL, PostgreSQL, Oracle, SQL Server, and H2. JDBC batch writes use independent transactions by default and can join host transactions through framework-specific JdbcExecutor adapters.
  • Nacos uses configuration snapshots and CAS for version consistency, with support for reading the previous layout during migration.
  • Business SQL connections and metadata transactions are configured separately. Spring, Solon, and Hasor adapters connect ordinary SQL, tran.* functions, and application transactions.

Requests, results, and console​

  • Unified JSON, URL-encoded form, and multipart parsing, including repeated form fields, uploads, and parameter wrapping. Upload storage has configurable memory thresholds and temporary directories, with cleanup after requests.
  • Connected Web functions to the current request and response for Header/Cookie access and uploaded files. HTTP objects are passed through query context and cleared after execution.
  • Unified response output through ResultHandler, with Structure, Raw Value, CSV, Text, and Verify Code handlers. Supports a default handler, handler-specific defaults, and per-API options; custom handlers control status, headers, and body.
  • Migrated and upgraded console components while retaining editing, debugging, publication, and history operations. Results support JSON, text, table, and image previews and file downloads.
  • Packaged console resources as dataway-embedded-web, supporting separate builds, replacement, and frontend/backend deployment. initializer.js configures backend URLs; development supports Mock and proxy modes.
  • Reimplemented documentation generation with OpenAPI 3.0 and Swagger 2.0 endpoints. Only published, enabled APIs are exported and can be invoked through Swagger UI.

Build, examples, and documentation​

Published the core, console, framework adapters, and metadata providers as separate modules. JDBC metadata uses dbVisitor 6.8.2 and the Hasor adapter uses Hasor 5.3.0. Added Spring, Solon, Hasor, and Spring with Nacos examples and verified integration through HTTP.

Upgrade notes​

  • Replace the legacy Dataway dependency and use the integration guides to configure endpoints, storage, and application identities.
  • Java and SPI: use AdminService for management and ApiService for published API calls. Migrate execution and serialization SPI implementations to interceptors and result handlers; integrate login through IdentityProvider.
  • Metadata: back up storage and preserve API IDs, original scripts, and publication history. Add revision and route constraints. Map SCRIPT_ORI when it contains the original script, and handle the Nacos layout change separately.
  • Responses: select output with defaultResultHandler and the API-level resultHandler option. Response templates belong to the Structure handler. Check default envelopes, failure responses, binary output, and custom handlers.

See the Dataway architecture, API, and data migration guide for interface mappings, configuration examples, and migration steps.