- BaseViewExtension: wrap the ViewRuntimeBridge provider collision with a message naming the real constraint (one view engine per FlashApp) instead of the generic "duplicate provider" error. - BaseViewExtension/JteExtension: carry registered globals across JteExtension's immutable settings builders (templateRoot/serveStatics/staticPrefix/withStaticCors/ staticCors). addGlobal() called before any of those used to be silently dropped, since each builder method returned a fresh instance with an empty globals list. - Correct flash-ext-view-jte docs (README, architecture.md, model-and-globals.md): globals merge flat with one typed @param per key, not under a global.* namespace like Thymeleaf — the docs previously claimed the same reserved namespace for both engines, which doesn't match JteRuntime's actual merge behavior. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1.4 KiB
1.4 KiB
Architecture
flash-ext-view-jte has two layers:
-
Boot-time
JteExtensioninstalls runtime + annotation processor.JteTargetResolvervalidates handlers and resolves@Template.- Resolved targets are cached per handler class.
-
Request-time
- Handler builds local
ViewModel. - Runtime merges globals and local model into one flat parameter map (fails fast on key collision).
- jte renders template into
StringOutput.
- Handler builds local
-
Static assets (optional, enabled by default)
- Extension mounts wildcard routes under
staticPrefix(default/static/**). - Assets are served from classpath
/static/**. - Uses Flash
Response.body(...)for small payloads andResponse.stream(...)for large payloads. - Supports ETag/304, gzip precompressed assets, MIME auto-resolution, and byte ranges.
- Extension mounts wildcard routes under
Handler Contract
- Must extend
JteHandler. - Must have route annotation (
@Route,@GET,@POST, ...). - Must declare exactly one view annotation:
@Template.
Invalid configurations fail fast at startup.
Defaults
templateRoot:/templatescontentType:gg.jte.ContentType.HtmldevelopmentMode:Flash.DEVusePrecompiled: derived from!developmentModeunless explicitly setbinaryStaticContent:falseserveStatics:truestaticPrefix:/staticlargeFileThresholdBytes:65536- static CORS: disabled (
false)