Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 1.88 KB

dev_guide.md

File metadata and controls

43 lines (30 loc) · 1.88 KB

Cardea Development Guide

Cardea API is a Spring Boot web app.

  • Auto-configuration automates a lot of application and library setup while allowing you to override any of its defaults
  • The IoC container simplifies the creation of application components via dependency injection
  • Controller classes respond to web requests

Configuration

App config is in /resources/application.yml. The properties in this file can be overridden using command-line parameters, system variables, or an external properties file. See the README for more information on the external properties file.

Debugging

Example: Run the server with debugging enabled on port 8000 and wait for debugger connection before starting:

mvn clean spring-boot:run -Dspring-boot.run.jvmArguments="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000"

A VSCode launch configuration named "Debug local Cardea API" is provided to connect to this.

Code Formatting

Cardea API has formatters configured for Java, HTML, and TypeScript in VSCode. For these to work, you must have the following extensions installed:

  • Language Support for Java(TM) by Red Hat

Data Loading

Cardea API serves QC Gate data generated by QC Gate ETL. The data directory is specified by the datadirectory property in application.properties. The CaseLoader class is responsible for loading the data from file. CaseService polls the directory for changes, invokes CaseLoader to reload the data when appropriate, and maintains a cache of the data to provide to other parts of the application.