Skip to content

Commit

Permalink
#43 - fixing application.properties files not overloading with multim…
Browse files Browse the repository at this point in the history
…odule setup

* #43 - fixing application.properties files not overloading with multimodule setup

* #43 - moving liquibase files

* #43 moving to yaml properties files, leveraging include in main application.yaml

* #39 making module names uniform
  • Loading branch information
pveeckhout authored Jun 27, 2023
1 parent 9a74570 commit 91b6159
Show file tree
Hide file tree
Showing 21 changed files with 63 additions and 44 deletions.
1 change: 0 additions & 1 deletion boot/src/main/resources/application.properties

This file was deleted.

10 changes: 10 additions & 0 deletions boot/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
management:
endpoints:
web:
exposure:
include: prometheus,health

spring:
config:
import:
- trademodule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@Configuration("TradeModuleMessagingConfig")
public class MessagingConfig {

@Bean
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package io.edpn.backend.trade.configuration;

import org.springframework.context.annotation.Configuration;

@Configuration("TradeModulePropertyConfig")
public class PropertyConfig {
}
10 changes: 0 additions & 10 deletions trade-module/src/main/resources/application-local.properties

This file was deleted.

10 changes: 0 additions & 10 deletions trade-module/src/main/resources/application.properties

This file was deleted.

22 changes: 0 additions & 22 deletions trade-module/src/main/resources/db/changelog/changelog-master.xml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd">

<include file="/db/trademodule/changelog/create_system_table.xml"/>
<include file="/db/trademodule/changelog/create_commodity_table.xml"/>
<include file="/db/trademodule/changelog/create_station_table.xml"/>
<include file="/db/trademodule/changelog/create_market_datum_table.xml"/>
<include file="/db/trademodule/changelog/add_foreign_key_indexes.xml"/>
<include file="/db/trademodule/changelog/add_commodity_market_view_query_performance_indexes.xml"/>
<include file="/db/trademodule/changelog/add_unique_indexes.xml"/>
<include file="/db/trademodule/changelog/create_request_data_message_table.xml"/>
<include file="/db/trademodule/changelog/add_timestamp_market_datum_table.xml"/>

<!-- views always last as they might depend on new columns -->
<include file="/db/trademodule/changelog/create_commodity_market_info_view.xml"/>
<include file="/db/trademodule/changelog/create_latest_market_data_view.xml"/>

</databaseChangeLog>
8 changes: 8 additions & 0 deletions trade-module/src/main/resources/trademodule-local.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
spring:
datasource:
url: jdbc:postgresql://localhost:54321/trademodule
username: edpn_trademodule
password: MSDVq372rNk3AwRq

kafka:
bootstrap-servers: localhost:9092
15 changes: 15 additions & 0 deletions trade-module/src/main/resources/trademodule.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
spring:
liquibase:
enabled: true
change-log: classpath:db/trademodule/changelog/trademodule-changelog.xml

datasource:
url: ${TRADEMODULE_DB_URL}
username: ${TRADEMODULE_DB_USERNAME}
password: ${TRADEMODULE_DB_PASSWORD}
driver-class-name: org.postgresql.Driver

kafka:
bootstrap-servers: ${KAFKA_URL}
consumer:
value-deserializer: org.springframework.kafka.support.serializer.JsonDeserializer

0 comments on commit 91b6159

Please sign in to comment.