Getting Started with Spring
This tutorial builds a small Spring Boot integration on top of a Genesis project created with genx, then exposes the data it manages through a data cube.
- Part 1 takes you through the Spring integration itself: project set-up, a
WIDGETtable, a Spring application with an event handler, and running it all under Genesis. - Part 2 builds a data cube on top of Part 1: HTTP query and aggregation endpoints over the
WIDGETtable. It's optional — stop after Part 1 if you only need the Spring integration.
Spring integration ships with Genesis v10. Make sure your project is on v10 (10.0.0 or later) before starting.
Part 1: Spring integration
Step 1: Create the project
npx -y @genesislcap/genx@latest init mySpringDemo
For non-interactive use (scripts/CI), add -x --no-shell: -x accepts the default answer for every prompt, and --no-shell stops genx dropping into an interactive sub-shell inside the new project when it finishes.
<project-name> is the name you gave to genx init, e.g. mySpringDemo.
npx -y @genesislcap/genx@latest init mySpringDemo -x --no-shell
The default seed already sets genesisVersion and authVersion in server/gradle.properties to a v10 release, and its Gradle wrapper is on the Gradle version the v10 Genesis Gradle plugins need, so no manual version bump is needed.
Step 2: Create the Spring module
Include the new module in server/settings.gradle.kts:
// server/settings.gradle.kts
include("<project-name>-spring")
Create the module directory with its build file at server/<project-name>-spring/build.gradle.kts:
// server/<project-name>-spring/build.gradle.kts
plugins {
id("global.genesis.spring")
kotlin("plugin.jpa")
}
dependencies {
api("global.genesis:genesis-spring-boot-starter")
api("global.genesis:genesis-eventhandler-spring-boot-starter")
api("global.genesis:genesis-data-spring-boot-starter")
api("global.genesis:genesis-jpa-base")
implementation(kotlin("stdlib"))
genesisGeneratedCode(withTestDependency = true)
}
genesisSpring {
entities {
packageName = "global.genesis.spring.demo"
}
}
Module dependency versions are pinned by the Genesis BOM, which the Settings plugin contributes as a platform dependency — you shouldn't need to specify versions on the individual global.genesis:* dependencies.
The dictionary .kts files live in the -app module. The genesisGeneratedCode(withTestDependency = true) line puts the dictionary cache generated from them on this module's compile classpath and, because of withTestDependency = true, on its test classpath too, where @GenesisSpringTest (see Testing API (Spring)) needs it.
Step 3: Switch logging to Logback
The Genesis Spring integration only works with Logback. The switch to Logback is application-wide: every process in the application, including the core Genesis processes such as GENESIS_COMPACT_PROCESS and AUTH_COMPACT_PROCESS, runs on Logback and reads the same Logback config. That means changes in three places, all in the app module.
1. The app module build file — server/<project-name>-app/build.gradle.kts:
genesisExec {
logging {
backend = LOGBACK
}
}
This puts the Logback backend on the classpath of every process the application runs, not just the Spring module's.
2. A Logback config at server/<project-name>-app/src/main/genesis/cfg/logback.xml. There's nothing Spring-specific about it — any valid Logback config works, for example one that rolls a per-process log file under GENESIS_HOME/runtime/logs into logs/archive:
<configuration>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${GENESIS_HOME}/runtime/logs/${PROCESS_NAME}.log</file>
<append>true</append>
<encoder>
<pattern>%date{dd MMM yyyy;HH:mm:ss.SSS} %-4relative [%thread] %-5level %logger{35} - %msg%n</pattern>
</encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${GENESIS_HOME}/runtime/logs/archive/${PROCESS_NAME}-%d{yyyy-MM-dd}.log.gz</fileNamePattern>
<maxHistory>30</maxHistory>
</rollingPolicy>
</appender>
<root level="INFO">
<appender-ref ref="FILE"/>
</root>
</configuration>
3. The system definition — server/<project-name>-app/src/main/genesis/cfg/genesis-system-definition.kts:
systemDefinition {
global {
// ...
item(name = "LogFramework", value = "LOG4J2")
item(name = "LogFrameworkConfig", value = "logback.xml")
// Unrelated to logging — a required setting that happens to live in the same file. See below.
item(name = "DbGenerateViewObjects", value = "true")
// ...
}
}
LogFrameworkConfig is a global setting, so every process in the application, the core Genesis processes included, loads your logback.xml. Which logging backend a process uses is decided by what backend = LOGBACK put on its classpath, not by the LogFramework value, so LogFramework stays LOG4J2. Leave both exactly as shown.
DbGenerateViewObjects isn't logging configuration at all — it's a required feature flag that makes the platform generate views as database objects. It's included in this step only because it lives in the same file; don't skip it. It generates the database views that Hibernate/JPQL needs to query over dictionary tables, which is why the Spring/JPA path requires it.
Step 4: Define the widget table
The tables dictionary, server/<project-name>-app/src/main/genesis/cfg/<project-name>-tables-dictionary.kts, already exists — it's part of the scaffold genx init generates in Step 1, with an empty top-level tables { } wrapper. This step adds a WIDGET table to it, inside that wrapper, not alongside it:
table("WIDGET", 12345) {
field("ID", LONG).autoIncrement().primaryKey()
field("NAME").uniqueIndex()
field("PRICE", DOUBLE)
field("QUALITY", ENUM("GOOD", "OK", "BAD"))
field("COST", DOUBLE)
}
QUALITY is declared inline, inside the table block, which makes it a table-scoped enum — the generated enum class ends up at <packageName>.dao.enums.<product>.widget.Quality, not the flat <packageName>.dao.enums.Quality you'd get from a field declared globally in the fields dictionary. The per-table package segment (widget, the table name lower-cased) is what lets two different tables each declare a table-scoped enum called Quality without their generated classes colliding — the class name itself stays Quality, not doubled. <product> is the dictionary file's name before -tables-dictionary.kts, taken verbatim except that any non-word character becomes _ — it is not lower-cased. It normally equals the productName configured in server/settings.gradle.kts (genesis { productName = ... }), because genx names the dictionary file after the project: for a project created with genx init <project-name>, the file is <project-name>-tables-dictionary.kts, so <product> is <project-name>, with any hyphen or other non-word character turned into _. See productName for the full property reference. See Data model (Spring) for how dictionary definitions map onto generated JPA entities.
Step 5: Implement the Spring application
Both classes in this step and the next live in the -spring module created in Step 2, under the source root server/<project-name>-spring/src/main/java.
Use the same <packageName> value here as the entities.packageName you set in Step 2 — the generated Widget/WidgetRepository classes Step 6 imports live under that package, and the hand-written classes need to share it for those imports to resolve.
package <packageName>;
import global.genesis.springboot.annotation.GenesisApplication;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@GenesisApplication
@SpringBootApplication
public class MySpringApp {
public static void main(String[] args) {
SpringApplication.run(MySpringApp.class, args);
}
}
Use the @GenesisApplication annotation and pass args to SpringApplication. Genesis derives the process name from the class name, converted from camel case to snake case (MySpringApp ⇒ MY_SPRING_APP); the name can be overridden in the @GenesisApplication annotation. See Application core for what this annotation wires up.
Step 6: Add a widget event handler
package <packageName>;
import <packageName>.dao.Widget;
import <packageName>.repo.WidgetRepository;
import global.genesis.eventhandler.spring.annotation.EventMapping;
import global.genesis.eventhandler.spring.annotation.GenesisEventController;
@GenesisEventController("WIDGET")
public class MyEventHandler {
private final WidgetRepository widgetRepository;
public MyEventHandler(WidgetRepository widgetRepository) {
this.widgetRepository = widgetRepository;
}
@EventMapping("INSERT")
public Widget insertWidget(Widget widget) {
return widgetRepository.save(widget);
}
@EventMapping("MODIFY")
public void modifyWidget(Widget newWidget) {
var dbWidget = widgetRepository.findById(newWidget.getId());
if (dbWidget == null) {
throw new IllegalStateException("Unable to find widget with id " + newWidget.getId());
}
widgetRepository.save(newWidget);
}
@EventMapping("DELETE")
public void deleteWidget(Widget widget) {
widgetRepository.delete(widget);
}
}
Widget and WidgetRepository are JPA entities/repositories generated by the build from the table definition in Step 4 — expect unresolved-symbol errors in your IDE until the first build in Step 7. See Core business logic (Spring) for the full annotation reference, and Data access APIs (JPA) for how a repository like WidgetRepository is generated and how its writes reach the database.
Step 7: Build, refresh, and run
- Build the server (
./gradlew assemblefromserver/, or your IDE's build). Besides compiling, this generates the JPA entities the event handler uses. - Refresh the Genesis process list so the new application is picked up — in the Genesis IntelliJ plugin, click the G icon then Refresh Task List; in Genesis Start, click the refresh button on the left of the window. The new application appears under its snake-case process name (
MY_SPRING_APP).
No GUI available (CI, a container, over SSH)? Start the process headlessly instead:
./gradlew writeStartScript -Pgenesis.start.headless=true \
-Pgenesis.start.restEnabled=true -Pgenesis.start.restPort=<port>
then run server/build/genesis-start/start.sh. restEnabled=true is required — without it the process starts and immediately exits. restPort here is Genesis Start's own control-plane port for managing the process, not the Spring application's HTTP port — that's the port the curl examples in Part 2 target, configured separately (see Step 11).
Headless, step 3 below has no button to click: instead, once Genesis Start is up, call its bootstrap endpoint. This is the same call as the GUI's Bootstrap and Launch:
curl -s -X POST 'http://localhost:<port>/api/bootstrap' \
-H 'Content-Type: application/json' -d '{}'
Bootstrap runs Remap, which installs the database schema and loads the seed data in your app module's src/main/genesis/data folder, including the admin user that Verify it logs in as. It then consolidates rights and starts every application process. Skip it and the processes have no users, so the login in Verify it fails. The call returns 202 Accepted straight away, but bootstrap itself can take several minutes. Poll GET http://localhost:<port>/api/processes until MY_SPRING_APP reports RUNNING or HEALTHY before going on.
To stop the processes again, or to check their status, call the same control-plane port. Stop every application process with:
curl -s -X POST 'http://localhost:<port>/api/processes/application/stop-all'
This returns 202 Accepted straight away and the shutdown carries on in the background. To stop a single process, name it in the path:
curl -s -X POST 'http://localhost:<port>/api/processes/MY_SPRING_APP/stop'
Check the state of the processes with:
curl -s 'http://localhost:<port>/api/processes'
A stopped process reports STOPPED.
The headless start also needs the google() Maven repository in the project's repositories. A project recently created with genx init already declares it in the allprojects { repositories { ... } } block of server/build.gradle.kts. A project upgraded from an older seed might not, so check that block and add google() if it is missing.
- Start the project in Genesis Start.
Once the processes are up, the Spring integration is complete.
Verify it
Confirm the Step 6 event handler actually persists an INSERT by triggering it directly. Every Genesis event handler — annotation-based or GPAL — is triggered the same way: the client sends a MESSAGE_TYPE of EVENT_<event name>, over Websocket or REST; see EVENT_<EVENT_HANDLER_NAME> for the full reference. @GenesisEventController("WIDGET") with @EventMapping("INSERT") from Step 6 registers the event as WIDGET_INSERT.
The call needs a SESSION_AUTH_TOKEN header. A freshly scaffolded project seeds a default user, admin, with the password genesis; log in as that user to get a token:
curl -s -X POST 'http://localhost:9064/event-login-auth' \
-H 'Content-Type: application/json' \
-d '{"DETAILS": {"USER_NAME": "admin", "PASSWORD": "genesis"}}'
Take the SESSION_AUTH_TOKEN value from the response and substitute it for <token> below — see EVENT_LOGIN_AUTH for the full request/response shape. The REST call is then:
curl -s -X POST 'http://localhost:9064/event-widget-insert' \
-H 'Content-Type: application/json' \
-H 'SESSION_AUTH_TOKEN: <token>' \
-H 'SOURCE_REF: 1' \
-d '{"DETAILS": {"NAME": "Widget 1", "PRICE": 10.0, "QUALITY": "GOOD", "COST": 6.0}}'
A successful insert returns EVENT_ACK. The ack's GENERATED is whatever the handler returns — Step 6's insertWidget returns the saved Widget, so GENERATED carries that row, including its generated ID:
HTTP/1.1 200 OK
content-type: application/json
{
"MESSAGE_TYPE": "EVENT_ACK",
"SOURCE_REF": "1",
"GENERATED": [
{
"ID": 1,
"NAME": "Widget 1",
"PRICE": 10.0,
"QUALITY": "GOOD",
"COST": 6.0,
"RECORD_ID": "<record id>",
"TIMESTAMP": "<timestamp>"
}
],
"METADATA": {
"IS_EMPTY": true,
"ALL": {}
}
}
9064 is the default port for GENESIS_ROUTER, the process that serves this REST gateway on a genx-scaffolded project.
Part 2 builds on this running app.
Part 2: Data cube
Cube endpoints run behind the Spring integration's session-token authentication, the same as any other endpoint — a request needs a valid SESSION_AUTH_TOKEN header or it gets 401. Step 11 shows how to obtain one.
The Widget entity generated in Step 7 is already dictionary-generated with a @CubeDefaultIdentity, which is all a cube needs from its source entity.
Step 8: Add the cube dependency
Alongside the other Genesis Spring dependencies from Step 2, in server/<project-name>-spring/build.gradle.kts:
dependencies {
// ...existing dependencies from Step 2...
implementation("global.genesis:genesis-data-cube-spring-boot-starter")
}
Step 9: Declare the cube resources
A CubeResource is just a @Bean — the bean name becomes the /api/v1/cubes/{resource} path segment. It's worth declaring more than one resource over the same table to see the two source styles side by side:
package <packageName>;
import <packageName>.dao.Widget;
import <packageName>.dao.enums.<product>.widget.Quality; // <product> is the product name explained in Step 4
// for this tutorial (project mySpringDemo): import global.genesis.spring.demo.dao.enums.mySpringDemo.widget.Quality;
import global.genesis.spring.data.cube.resource.CubeResource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class CubeResources {
// entity source — bean name "widgets" -> /api/v1/cubes/widgets/...
@Bean
public CubeResource widgets() {
return CubeResource.forEntity(Widget.class)
.exposeQuery() // no projection: every entity column is visible
.operation("byQuality", op -> op
.groupBy("quality")
.sum("cost", "totalCost")
.sum("price", "totalPrice")
.count("widgetCount")
.projection(WidgetsByQuality.class))
.build();
}
// JPQL source over the same WIDGET table, deriving a "margin" column an entity source can't express.
// bean name "widgetMargins" -> /api/v1/cubes/widgetMargins/...
@Bean
public CubeResource widgetMargins() {
return CubeResource.forJpql(
"select w.id as id, w.name as name, w.quality as quality, "
+ "w.price as price, w.cost as cost, (w.price - w.cost) as margin "
+ "from Widget w")
.exposeQuery(q -> q.projection(WidgetMargin.class))
.operation("byQuality", op -> op
.groupBy("quality")
.avg("margin", "avgMargin")
.count("widgetCount")
.projection(MarginByQuality.class))
.build();
}
}
// named-operation output ("/widgets/byQuality") — group key + aggregation aliases only
record WidgetsByQuality(Quality quality, Double totalCost, Double totalPrice, Long widgetCount) {}
// full column set available to exposeQuery ("/widgetMargins/query") — no join needed, so row identity
// (the "id" column) survives and the resource stays cacheable
record WidgetMargin(Long id, String name, Quality quality, Double price, Double cost, Double margin) {}
// named-operation output ("/widgetMargins/byQuality")
record MarginByQuality(Quality quality, Double avgMargin, Long widgetCount) {}
widgets deliberately calls exposeQuery() with no customizer — fully permissive, every entity column visible on the dynamic /widgets/query path, no projection DTO needed. widgetMargins bounds its exposeQuery to the WidgetMargin projection instead, since the JPQL source's computed margin column only exists inside that projection's column set.
A few rules specific to the JPQL path — see Cube Query Engine for the full reference (query syntax, response envelope, caching):
- Every selection needs an alias, and that alias is the column name callers use — including a computed expression like
margin, which JPQL cannot name automatically. The alias is separate from the entity property it selects (thepriceinw.price). - Joining another table requires calling
.allowJoins()explicitly, since a join can multiply rows and inflateSUM/COUNT. - The query is parsed and column-typed at startup, so a typo in an entity property (for example
w.priceXinstead ofw.price) fails the boot, not the first request. - Because the query selects
w.idfrom a single, unmultiplied root, row identity survives — the resource stays addressable (each row carries aROW_REF) andETag-cacheable, same as the entity source.
Cube endpoints are only registered if at least one CubeResource bean exists in the context — no bean, no /api/v1/cubes/** endpoints and no error.
Step 10: Seed some data
If you did Part 1, the WIDGET table is not empty: the H2 database is file-backed, so the "Widget 1" row you inserted there is still present. On a table with no rows at all, an empty cube just returns an empty rows array on every route. A Spring Boot ApplicationRunner is the simplest way to seed some more widgets on boot. It adds only its own widgets (named Seed Widget 1 to Seed Widget 10) that are not already in the table, and leaves existing rows such as "Widget 1" alone:
package <packageName>;
import <packageName>.dao.Widget;
import <packageName>.dao.enums.<product>.widget.Quality; // <product> is the product name explained in Step 4
import <packageName>.repo.WidgetRepository;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;
import java.util.Set;
import java.util.stream.Collectors;
@Component
public class WidgetSeeder implements ApplicationRunner {
private static final Quality[] QUALITIES = Quality.values();
private final WidgetRepository widgetRepository;
public WidgetSeeder(WidgetRepository widgetRepository) {
this.widgetRepository = widgetRepository;
}
@Override
public void run(ApplicationArguments args) {
Set<String> existingNames = widgetRepository.findAll().stream()
.map(Widget::getName)
.collect(Collectors.toSet());
for (int i = 1; i <= 10; i++) {
String name = "Seed Widget " + i;
if (existingNames.contains(name)) {
continue;
}
double price = 10.0 * i;
double cost = price * 0.6;
Quality quality = QUALITIES[i % QUALITIES.length];
widgetRepository.save(new Widget(0L, name, price, quality, cost));
}
}
}
Like the CSV seed data under server/<project-name>-app/src/main/genesis/data, this only runs at startup — rebuild and restart the app (Step 7) to pick up changes from this part; nothing here hot-reloads.
Step 11: Query it
With the app rebuilt, restarted, and seeded:
These examples assume the default port 8080. To run on a different port, set server.port in application.properties/application.yml (the scaffolded -spring module has neither, so create the file if it does not exist, for example server/<project-name>-spring/src/main/resources/application.properties), or pass -Dserver.port=<port> — this is plain Spring Boot configuration. If you switch the app to external transport mode, it serves on its service-definition port instead, and server.port must be unset, 0, or that port. The router's port (9064 by default) is overridden with GENESIS_ROUTER_PORT; see Service definition: Overriding ports at runtime. Adjust the host:port in the curl examples below to match.
Every call below needs a SESSION_AUTH_TOKEN header (see the note at the start of Part 2). Obtain one by logging in against your project's GENESIS_ROUTER — by default port 9064 — with your own project's admin credentials:
curl -s -X POST 'http://localhost:9064/event-login-auth' \
-H 'Content-Type: application/json' \
-d '{"DETAILS": {"USER_NAME": "admin", "PASSWORD": "genesis"}}'
Take the SESSION_AUTH_TOKEN value from the response and substitute it for <token> below — see EVENT_LOGIN_AUTH for the full request/response shape.
# canned aggregate on the entity source: total cost/price and widget count per quality grade
curl -s -H 'SESSION_AUTH_TOKEN: <token>' 'http://localhost:8080/api/v1/cubes/widgets/byQuality?sort=-totalCost'
# dynamic path on the entity source: flat, unfiltered page of raw widgets
curl -s -X POST 'http://localhost:8080/api/v1/cubes/widgets/query' \
-H 'Content-Type: application/json' -H 'SESSION_AUTH_TOKEN: <token>' -d '{}'
# canned aggregate on the JPQL source: average margin per quality grade
curl -s -H 'SESSION_AUTH_TOKEN: <token>' 'http://localhost:8080/api/v1/cubes/widgetMargins/byQuality'
# dynamic path on the JPQL source: flat rows including the computed "margin" column
curl -s -X POST 'http://localhost:8080/api/v1/cubes/widgetMargins/query' \
-H 'Content-Type: application/json' -H 'SESSION_AUTH_TOKEN: <token>' -d '{}'
With the seed data above plus the Part 1 "Widget 1" (GOOD, price 10, cost 6), widgets/byQuality comes back like this — three groups (GOOD/OK/BAD), each with its summed cost/price and a count. The group key (quality) is also the operation's projection, so it doubles as each row's identity and the response carries a ROW_REF per row:
{
"rows": [
{ "quality": "OK", "totalCost": 132.0, "totalPrice": 220.0, "widgetCount": 4, "ROW_REF": "1|OK" },
{ "quality": "GOOD", "totalCost": 114.0, "totalPrice": 190.0, "widgetCount": 4, "ROW_REF": "1|GOOD" },
{ "quality": "BAD", "totalCost": 90.0, "totalPrice": 150.0, "widgetCount": 3, "ROW_REF": "1|BAD" }
],
"hasMore": false,
"rowKind": "GROUPED",
"page": { "number": 0, "size": 100 },
"columns": [
{ "name": "quality", "role": "KEY", "type": "ENUM" },
{ "name": "totalCost", "role": "MEASURE", "type": "DOUBLE" },
{ "name": "totalPrice", "role": "MEASURE", "type": "DOUBLE" },
{ "name": "widgetCount", "role": "MEASURE", "type": "LONG" },
{ "name": "ROW_REF", "role": "ROW_REF", "type": "STRING" }
]
}
widgetMargins/query comes back differently: it's the dynamic path with no grouping, so every row (the Part 1 widget and the seeded ones) is returned flat, each carrying the full WidgetMargin column set plus its own ROW_REF:
{
"rows": [
{ "id": 1, "name": "Widget 1", "quality": "GOOD", "price": 10.0, "cost": 6.0, "margin": 4.0, "ROW_REF": "1|1" },
{ "id": 2, "name": "Seed Widget 1", "quality": "OK", "price": 10.0, "cost": 6.0, "margin": 4.0, "ROW_REF": "1|2" },
{ "id": 3, "name": "Seed Widget 2", "quality": "BAD", "price": 20.0, "cost": 12.0, "margin": 8.0, "ROW_REF": "1|3" },
{ "id": 4, "name": "Seed Widget 3", "quality": "GOOD", "price": 30.0, "cost": 18.0, "margin": 12.0, "ROW_REF": "1|4" },
{ "id": 5, "name": "Seed Widget 4", "quality": "OK", "price": 40.0, "cost": 24.0, "margin": 16.0, "ROW_REF": "1|5" },
{ "id": 6, "name": "Seed Widget 5", "quality": "BAD", "price": 50.0, "cost": 30.0, "margin": 20.0, "ROW_REF": "1|6" },
{ "id": 7, "name": "Seed Widget 6", "quality": "GOOD", "price": 60.0, "cost": 36.0, "margin": 24.0, "ROW_REF": "1|7" },
{ "id": 8, "name": "Seed Widget 7", "quality": "OK", "price": 70.0, "cost": 42.0, "margin": 28.0, "ROW_REF": "1|8" },
{ "id": 9, "name": "Seed Widget 8", "quality": "BAD", "price": 80.0, "cost": 48.0, "margin": 32.0, "ROW_REF": "1|9" },
{ "id": 10, "name": "Seed Widget 9", "quality": "GOOD", "price": 90.0, "cost": 54.0, "margin": 36.0, "ROW_REF": "1|10" },
{ "id": 11, "name": "Seed Widget 10", "quality": "OK", "price": 100.0, "cost": 60.0, "margin": 40.0, "ROW_REF": "1|11" }
],
"hasMore": false,
"rowKind": "FLAT",
"page": { "number": 0, "size": 100 },
"columns": [
{ "name": "id", "role": "KEY", "type": "LONG" },
{ "name": "name", "role": "KEY", "type": "STRING" },
{ "name": "quality", "role": "KEY", "type": "ENUM" },
{ "name": "price", "role": "KEY", "type": "DOUBLE" },
{ "name": "cost", "role": "KEY", "type": "DOUBLE" },
{ "name": "margin", "role": "KEY", "type": "DOUBLE" },
{ "name": "ROW_REF", "role": "ROW_REF", "type": "STRING" }
]
}
These JSON blocks are abbreviated for readability — a real response's column descriptors also carry pivot, groupLevel, numberAsString and encoding, and the envelope itself carries a top-level generation string. See Cube Query Engine for the full response shape.
Further reading
- Application core — the Guice/Spring bridge underlying
@GenesisApplication - Core business logic (Spring) — the full annotation reference
- Data access APIs (JPA) — how generated repositories read and write through to the database
- Cube Query Engine — query syntax, response envelope, caching, and security
- Data model (Spring) — how dictionary tables become generated JPA entities
- Build tooling — the Gradle plugin chain used above