Configuration of the SmartWeb Application
SmartWeb is a Spring Boot 4.x application (Java 21) that is started as a self-contained executable JAR (smartweb.jar) with an embedded Apache Tomcat, or alternatively as a WAR deployed into a standalone Tomcat. All runtime behaviour — connection to D2000, authentication, API exposure (REST, CometD, gRPC, OData, OpenAPI, OAuth2), connectors, monitoring — is controlled by a single configuration file application.yaml.
Location of the configuration file
Deployment | Location of |
|---|---|
Standalone JAR |
|
OCI / container image |
|
WAR in external Tomcat |
|
On the first start, SmartWeb auto-generates a default application.yaml from an internal template if no configuration file is found. A legacy smartweb.json (used in older versions) is automatically migrated to YAML on first start.
The configuration file can be modified while the server is running; changes take effect only after the SmartWeb application is restarted (redeployed).
Top-level structure
All SmartWeb-specific properties are bound under the smartweb. prefix. The general structure is:
server:
port: 8443
ssl:
# Embedded Tomcat TLS — affects HTTPS for REST, CometD, OData, OpenAPI, OAuth2, admin console
enabled: true
key-store: config/cert/keystore.p12
key-store-type: PKCS12
key-store-password: changeit
key-alias: smartweb
smartweb:
# D2000 JAPI connections (direct or listenable) — see "Connection Configuration on D2000"
connections: [ ... ]
listenableConnection: { ... }
# EDA (Energy Data Archive) connection — see "Configuration of the EDA Server Connection"
edaConnection: { ... }
# Authentication: D2000 users, applicative users, API keys, OAuth2 JWT, SPNEGO, client certificates
authentication: { ... }
application:
# Universal API interfaces REST, CometD, gRPC and OpenAPI — see "Universal API Configuration"
restApi: { ... }
cometApi: { ... }
grpcApi: { ... }
openApi: { ... }
# OAuth2 token endpoint — see "OAuth2 API Configuration"
oauth2: { ... }
# Web Push, D2 service, OpenAPI, SmartWeb federation connectors — see "Connectors Configuration"
connectors: { ... }
# VAPID keys for Web Push notifications — see "Web Push Configuration"
api:
vapid: { ... }
# Web application sources and development hot-reload — see "Web Application Configuration"
webResourceDirectories: [ ... ]
development: { ... }
# Thin Client URL — see "Configuration of the Integration with a Thin Client"
tcl: { ... }
# Embedded Logback log levels
logging:
level:
root: INFO
com.ipesoft.smartweb: INFOThe individual configuration sections are described in the following chapters:
Section | Page |
|---|---|
Connection to the D2000 kernel (JAPI) | |
Connection to the EDA server | |
Authentication (D2000, RPC, API keys, OAuth2, certificates, SPNEGO) | |
Universal API interfaces (REST, CometD, gRPC, OData, OpenAPI) | |
OAuth2 token endpoint and SmartWeb Proxy | |
Web Push notifications (VAPID) | |
D2 service, OpenAPI and SmartWeb federation connectors | |
Web application sources and development hot-reload | Configuration of a Web Application and Support of its Development |
Thin Client integration |
[!NOTE]
All examples in the following chapters use YAML. The legacy smartweb.json format is still accepted as input and is migrated to YAML on first startup. New deployments should always use YAML.