-
Notifications
You must be signed in to change notification settings - Fork 2
Backend Setup
This guide details how to configure, run, and debug the Java backend services (backend/, legacy/, and processor/) on your local machine.
-
Java Development Kit (JDK): JDK 17, 21, or 25 (Adoptium / Eclipse Temurin or GraalVM recommended). Baseline compatibility targets Java 17 for
backendandprocessorand Java 21 forlegacy, with CI tests and native image builds executing on JDK 25. -
Apache Maven: Version 3.9+ installed and added to your
PATH. -
Running Databases: Ensure PostgreSQL and Oracle services are started via
docker compose up -d database legacydb legacyflyway.
Each developer maintains an isolated configuration profile so local settings and credentials are never checked into Git. Create an application-dev-<yourname>.yml (e.g., application-dev-jsmith.yml) in the config/ directory of each service.
Note
The examples below use the safe local container defaults defined in docker-compose.yml (postgres/default and THE/default). Never commit production credentials, secret tokens, or private network hosts to Git configuration files.
ca:
bc:
gov:
nrs:
# PostgreSQL Connection Details (local container)
postgres:
database: ${POSTGRESQL_DATABASE:postgres}
host: ${POSTGRESQL_HOST:localhost}:5432
username: ${POSTGRESQL_USER:postgres}
password: ${POSTGRESQL_PASSWORD:default}
# Frontend URL for CORS
frontend:
url: ${FRONTEND_URL:http://localhost:3000}
# Legacy Oracle service endpoint
legacy:
url: http://localhost:9000
# CHES (Common Hosted Email Service) Mock / Stub URL
ches:
uri: http://127.0.0.1:10010/chess/uri
tokenUrl: http://127.0.0.1:10010/token/uri
clientId: dev-client
clientSecret: dev-secret
scope: openid
# BC Registry Sandboxed API
bcregistry:
uri: https://bcregistry-sandbox.apigee.net
apiKey: dev-key
accountId: account dev-account# Override TCPS/SSL with standard TCP R2DBC URL to connect to local container
spring:
r2dbc:
url: r2dbc:oracle://${ca.bc.gov.nrs.oracle.host}:${ca.bc.gov.nrs.oracle.port}/${ca.bc.gov.nrs.oracle.service}
ca:
bc:
gov:
nrs:
# Oracle Connection Details (local container legacydb)
oracle:
host: localhost
port: 1521
service: FREEPDB1
database: FREEPDB1
schema: THE
username: THE
password: defaultca:
bc:
gov:
nrs:
# PostgreSQL Connection Details (local container)
postgres:
database: ${POSTGRESQL_DATABASE:postgres}
host: ${POSTGRESQL_HOST:localhost}:5432
username: ${POSTGRESQL_USER:postgres}
password: ${POSTGRESQL_PASSWORD:default}
# Main Backend API endpoint
backend:
uri: http://localhost:8080/api
# Legacy Oracle service endpoint
legacy:
uri: http://localhost:9000/apiRun the desired service with your active profile:
# 1. Main Backend Service (port 8080)
cd backend
mvn spring-boot:run -Dspring-boot.run.profiles=dev-<yourname>
# 2. Legacy Oracle Connector (port 9000)
cd legacy
mvn spring-boot:run -Dspring-boot.run.profiles=dev-<yourname>
# 3. Background Submission Processor
cd processor
mvn spring-boot:run -Dspring-boot.run.profiles=dev-<yourname>-
Google Java Code Style:
- Open Settings / Preferences (
Ctrl+Alt+SorCmd+,). - Navigate to Editor > Code Style > Java.
- Click the gear icon next to Scheme and select Import Scheme > CheckStyle Configuration.
- Select
backend/docs/google_checks.xml.
- Open Settings / Preferences (
-
Run / Debug Configurations:
- Open
ca.bc.gov.app.BootApplication.java. - In the run configuration, set Active Profiles to
dev-<yourname>. - Ensure the JDK is set to Java 17 or 21.
- Open
-
Google Style Formatter:
- Go to Window > Preferences > Java > Code Style > Formatter.
- Import
backend/docs/eclipse-java-google-style.xml. - Set active profile to GoogleStyle.
-
Project Lombok:
- If using Eclipse, install Project Lombok by executing:
java -jar ~/.m2/repository/org/projectlombok/lombok/<version>/lombok-<version>.jar
- Follow installer prompts, select your Eclipse executable, and restart the IDE.
- If using Eclipse, install Project Lombok by executing:
This wiki serves as the central documentation and knowledge base for the Forests Client Management System, maintained by the British Columbia Ministry of Forests.
Please Note:
- This wiki is a living document maintained by the development team and contributors.
- When making substantial architectural or code changes, remember to update the corresponding wiki documentation.
- Always verify critical environment configurations against team vaults and OpenShift secret managers.
Have questions, found a documentation discrepancy, or need clarification?
- Questions or Bug Reports: Open an issue in the GitHub repository
- Pull Requests: Submit code or doc improvements via Pull Requests
- Database Schema Reference: Explore our SchemaSpy ER Diagrams
Forest Client Wiki | GitHub Repository
- Architecture Overview
- Frontend Architecture
- Frontend Structure
- Backend Architecture
- Backend Structure
- Legacy Architecture
- Processor Architecture
- Data Model
- Development Overview
- Local Setup & Docker
- Frontend Setup
- Backend Setup
- Project Conventions
- Frontend Structure Guidelines