Skip to content

Spring Boot and Modern Admin Console

Piergiorgio Lucidi edited this page Nov 30, 2026 · 3 revisions

Spring Boot Executable WAR & Modern Admin Console

Available in 2.32-SNAPSHOT (trunk) alongside the classic Jetty 12.1 distribution. All legacy endpoints (/mcf-crawler-ui, /mcf-api-service, /mcf-authority-service) remain 100% preserved and backwards compatible.

Overview

Apache ManifoldCF provides a unified Spring Boot 4.2 executable WAR (framework/spring-boot-app) running on Java 25 LTS with Virtual Threads (spring.threads.virtual.enabled=true) enabled by default. It bundles every ManifoldCF capability into a single deployable artifact (mcf-spring-boot-app.war) that can run standalone via java -jar or be deployed into an external Jakarta Servlet 6 container:

flowchart LR
    Browser["Browser / Admin"] --> ModernUI["Modern Admin Console (/ui/)"]
    Browser --> LegacyUI["Classic Crawler-UI (/mcf-crawler-ui)"]
    Automation["CI/CD, CLI, SDK"] --> ApiV2["REST API v2 (/api/v2/*) + Swagger UI"]
    Automation --> ApiV1["Classic REST API v1 (/mcf-api-service)"]
    Search["Solr / OpenSearch / Elasticsearch"] --> AuthSvc["Authority Service (/mcf-authority-service)"]

    ModernUI --> ApiV2
    ApiV2 --> Core["ManifoldCF Core + AgentsDaemon (Java 25 Virtual Threads)"]
    ApiV1 --> Core
    LegacyUI --> Core
    AuthSvc --> Core
    Core --> DB[(HSQLDB / PostgreSQL / MariaDB)]
Loading

Building & Running the Spring Boot Distribution

Prerequisites

  • Java 25 LTS or higher (java -version)
  • Apache Ant 1.10+ and/or Apache Maven 3.8+

Build with Apache Ant (Recommended for Full Connector Packaging)

# Build full distribution including connectors and dist/example-spring-boot
ant clean build

# Or rebuild only the Spring Boot WAR and sync to dist/spring-boot-app & dist/web/war
ant build-spring-boot-app

Build with Apache Maven

mvn -pl framework/spring-boot-app -am install -DskipTests

ant build-spring-boot-app runs the same install command so upstream snapshot modules are available in the local Maven repository for a subsequent ant test-spring-boot-app (mvn -pl framework/spring-boot-app test).

The resulting WAR (~81 MB) bundles the HSQLDB and PostgreSQL JDBC drivers and applies the classic Crawler-UI as a WAR overlay (the nested mcf-crawler-ui-*.war is excluded from WEB-INF/lib/).

Run with Docker

A dedicated Spring Boot image variant is published alongside the classic Jetty image:

docker run -d -p 8345:8345 --name manifoldcf-spring-boot apache/manifoldcf:2.32-spring-boot

The image is built from Dockerfile.spring-boot, runs dist/example-spring-boot/start.sh as the non-root manifoldcf user, honors MCF_PORT / SERVER_PORT / MCF_JAVA_OPTS, and declares a HEALTHCHECK on /actuator/health. See Docker Images for full details.

Launch Locally (dist/example-spring-boot)

cd dist/example-spring-boot
./start.sh

Override the port or any Spring Boot property via standard CLI arguments:

./start.sh --server.port=9090

On Windows:

cd dist\example-spring-boot
start.bat

Service Endpoints (Default Port 8345)

Service URL Auth Required
Modern Admin Console http://localhost:8345/ui/ Yes (/ui/login.html)
Classic Crawler-UI (JSP) http://localhost:8345/mcf-crawler-ui Yes (/login.jsp)
REST API v2 http://localhost:8345/api/v2/* Yes (HTTP Basic)
Swagger UI (OpenAPI 3.x) http://localhost:8345/mcf-api-service/swagger-ui Yes (HTTP Basic)
OpenAPI 3 Spec (JSON / YAML) http://localhost:8345/api/v2/openapi Yes (HTTP Basic)
REST API v1 (Legacy) http://localhost:8345/mcf-api-service/json/* Yes (Basic / Session)
Authority Service http://localhost:8345/mcf-authority-service/UserACLs Network-restricted
Health Probe http://localhost:8345/api/v2/health Open (for K8s/Docker probes)
Spring Boot Actuator Health http://localhost:8345/actuator/health Open (details when authorized)

Configuration (application.properties & properties.xml)

dist/example-spring-boot/start.sh loads both properties.xml (core ManifoldCF database, connector lib paths, thread pools, credentials) and application.properties (Spring Boot web/API/Actuator settings):

spring.threads.virtual.enabled=true
server.port=${MCF_PORT:8345}

# Session cookie hardening (aligned with crawler-ui / combined-service web.xml)
server.servlet.session.timeout=30m
server.servlet.session.cookie.http-only=true
server.servlet.session.cookie.same-site=lax

# ManifoldCF runtime home directory and lifecycle
manifoldcf.home=.
manifoldcf.bootstrap.enabled=true

# ManifoldCF REST API v2 & OpenAPI 3.x configuration
manifoldcf.api.v2.auth.enabled=true
manifoldcf.api.v2.openapi.enabled=true
manifoldcf.api.v2.swagger.enabled=true

# Springdoc OpenAPI 3.x & Swagger UI
springdoc.api-docs.enabled=${manifoldcf.api.v2.openapi.enabled:true}
springdoc.api-docs.path=/api/v2/openapi
springdoc.swagger-ui.enabled=${manifoldcf.api.v2.swagger.enabled:true}
springdoc.swagger-ui.path=/mcf-api-service/swagger-ui
springdoc.paths-to-match=/api/v2/**

# Spring Boot Actuator
management.endpoints.web.exposure.include=health,info,metrics
management.endpoint.health.show-details=when_authorized

For full properties.xml options (PostgreSQL, MariaDB, ZooKeeper multi-process, obfuscation passcode/salt), see How to Build and Deploy.


Modern Admin Console (/ui/)

The Modern Admin Console (/ui/) is a zero-build, zero-external-CDN vanilla ES-module web application with full feature parity against the classic Crawler-UI plus modern operational workflows:

Key Capabilities

  • Dedicated Login Experience (/ui/login.html): Official Apache ManifoldCF branding, live service health & version pill, show/hide password toggle, accessible validation alerts (aria-invalid), theme toggle, and clean sign-out redirect without triggering browser-native Basic Auth popups.
  • Role-Aware UI (RBAC): Calls GET /api/v2/auth/me on sign-in to detect IAuthorizer capabilities (viewConnections, editConnections, viewJobs, editJobs, runJobs, viewReports) and adapts visible controls accordingly.
  • Operational Dashboard: Live resource metric cards, JVM Heap utilization meter, Quick Start onboarding checklist (auto-hides once output, repository, and job are configured), and Recent Crawl Jobs summary with status pills.
  • Complete Resource & Connector Management: Full CRUD + View modal + live status checks for all 7 resource types:
    • Authority Groups
    • User Mapping Connections
    • Authority Connections
    • Transformation Connections
    • Output Connections (including Re-index All / Clear Versions and Remove All Records)
    • Notification Connections
    • Repository Connections (including Clear History)
  • Dynamic Native Connector UI Bridge: Dynamically renders every installed connector's native Velocity/JSP configuration and job specification tabs inside the modern tabbed modal (/api/v2/connector-ui/*) — including full native connector JavaScript validation (checkConfigForSave()) and form round-trips (such as FileConnector's Paths tab or EmailConnector's Server tab).
  • Bulk Operations & Search: One-click Test All Status across any connection table, instant client-side table search (#table-search), and ⌘K / Ctrl+K Global Command & Entity Search jumping directly to any view or opening any connection/job.
  • Visual Multi-Stage Pipeline Builder & DAG: Interactive crawl flow diagram ordering stages clearly from Repository → Transformation(s) → Output(s) plus completion notifications. Adding a Transformation stage automatically places it before terminal Output stages.
  • Human-Friendly Job Scheduling: One-click presets (Continuous, Hourly, Nightly 02:00, Weekly) and interactive 7-day Day-of-Week toggle chips alongside exact duration fields.
  • Status & Job Management: Live Start, Start Minimal, Pause, Resume, Abort, Restart, Restart Minimal, Reset Seeding actions with progress bars, exact/approximate count indicators, and optional auto-refresh.
  • All 6 Status & History Reports with Zero-Dependency SVG Charts:
    • Document Status Report & Queue Status Report (stacked bar chart, multi-select state/status pickers, case-insensitive regex, Active Time Offset now)
    • Simple History Report (KPI summary strip, quick time presets 15m/1h/24h/7d, multi-select activity picker)
    • Maximum Activity, Maximum Bandwidth, and Result Histogram (interactive SVG bar charts with click-to-filter result codes)
    • One-click Export CSV and Export JSON on every report.
  • Live Activity Tail Drawer: Slide-over drawer streaming real-time repository activity history rows with pause/resume and connection switching.
  • Configuration-as-Code (GitOps) Workspace: Export full topology as YAML or JSON, drag-and-drop manifest upload, visual Dry-Run Diff Cards (+Create, ~Update, =Unchanged, !Error), and one-click Apply.
  • UX Polish & Accessibility: Light/Dark color-scheme toggle (meta[name="color-scheme"] + light-dark()), collapsible icon sidebar rail, URL #hash deep-linking, View Transitions API, ? keyboard shortcuts dialog, capped top-layer popover toast notifications, and 4-locale i18n (English, Spanish, Japanese, Simplified Chinese).

Browser End-to-End Testing (Selenium 4.54.0)

framework/spring-boot-app includes three complementary live E2E test suites:

  1. ModernAdminUiBrowserEndToEndTest — Real headless Chrome E2E suite powered by Selenium 4.54.0 (ChromeDriver + Selenium Manager). Drives login, all 7 connector/resource types (including native connector UI validation & tabs), multi-stage job creation & pipeline ordering, live FileConnector crawl to done (100%), all 6 reports + SVG charts + filters, GitOps dry-run diff cards, ⌘K search, Live Activity Tail, i18n, full UI teardown, sign-out, and asserts zero SEVERE browser console errors.
  2. ModernAdminUiEndToEndTest — Comprehensive HTTP-level parity suite exercising REST API v2, Dynamic Connector UI bridge, live crawl execution, all 6 reports, and Configuration-as-Code.
  3. CrawlerUiEndToEndTest — Target-agnostic E2E suite verifying the classic JSP Crawler-UI (/mcf-crawler-ui) and CSRF token protections.

Running the Tests Against a Live Instance

Start a Spring Boot instance (for example on port 8345), then run:

# Run only the Selenium 4.54.0 headless-Chrome browser E2E suite
mvn -pl framework/spring-boot-app test \
  -Dtest=ModernAdminUiBrowserEndToEndTest \
  -Dmcf.ui.browserE2E=true \
  -Dmcf.ui.baseUrl=http://localhost:8345

# Run ALL unit, controller, integration, HTTP E2E, legacy UI E2E, and browser E2E tests
mvn -pl framework/spring-boot-app test \
  -Dmcf.ui.browserE2E=true \
  -Dmcf.ui.baseUrl=http://localhost:8345

Optional credentials overrides: -Dmcf.ui.username=admin -Dmcf.ui.password=admin.

Continuous Integration

.github/workflows/ci.yml runs ant test-spring-boot-app on tag pushes, releases, and manual workflow_dispatch runs (live-server and browser E2E suites are skipped because mcf.ui.baseUrl / mcf.ui.browserE2E are not set), then builds both Docker images and smoke-tests the Spring Boot container (/actuator/health, /api/v2/health, /ui/index.html, /api/v2/openapi). See Docker Images.


Related Pages

Clone this wiki locally