Skip to content

Change Database Engine

Bordi Tamás edited this page Aug 16, 2023 · 5 revisions

By default this reference implementation of Arrowhead FW provides MySQL database engine connector, however the source code itself is written to be database-agnostic. This means that you can switch the underlying database without changing much of the code.

1) Change the database connector dependency

Change this dependency definition in the root pom.xml.

<dependency>
	<groupId>mysql</groupId>
	<artifactId>mysql-connector-java</artifactId>
	<version>${mysql.jdbc.driver}</version>
	<scope>runtime</scope>
</dependency>

to MariaDB

<dependency>
	<groupId>org.mariadb.jdbc</groupId>
	<artifactId>mariadb-java-client</artifactId>
	<scope>runtime</scope>
</dependency>

to PostgreSQL

<dependency>
        <groupId>org.postgresql</groupId>
        <artifactId>postgresql</artifactId>
	<scope>runtime</scope>
</dependency>

2) Change the system configurations

Change the following properties in the src/main/resources/application.properties configuration file in case of each core system.

spring.datasource.url=jdbc:mysql://<address>:<port>/<database-name>  

to MariaDB

spring.datasource.url=jdbc:mariadb://<address>:<port>/<database-name>  

to PostgreSQL

spring.datasource.url=jdbc:postgresql://<address>:<port>/<database-name>  

ABOUT

GETTING STARTED

Certificates

Quick start

How to contribute?

HINTS

MANDATORY CORE SYSTEMS

Service Registry

Orchestrator

Authorization

APPLICATION SYSTEMS

SUPPORTING CORE SYSTEMS

Gatekeeper

Gateway

Event Handler

Choreographer

Quality of Service Monitor

Certificate Authority

System Registry

Device Registry

Onboarding

Data Manager

Time Manager

Plant Description Engine

HawkBit Configuration Manager

Device Hub

Clone this wiki locally