Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

13 Expanding System domain to all REST layers #25

Conversation

Daniel-J-Mason
Copy link
Collaborator

Created a full set of layers from Controller to persistence for System.
System will grow in the future as remaining entities get added.
Controller Methods will also grow to implement more searchable features in the future

Daniel-J-Mason and others added 19 commits May 8, 2023 11:25
Convert related domain records to domain classes.
Add domain repositories
Add a copy of Infrastructure utilities from Kafka
Add SystemMapper
…ontains for all.

Add bean to enable Lazy loading by default to prevent excessive data loading

Pull development updates

Generate Persistence Repositories

Flagged liquibase systems table for update
remove 0014-add-star_class-to-systems-table.xml
change ALL tables to singular
remove 0014-add-star_class-to-systems-table.xml
change ALL tables to singular
Update changelog to allow coords to be null
change x/y/z -> x_coordinate/y_coordinate/z_coordinate
Update processors to work with inbound schema changes
Remove star clas from nav route
…astructure-for-system' into 13-rest-domain-repository-+-infrastructure-for-system
create application layer for System
add System beans
add dev profile back to application.properties
temporarily remove logback from rest
replace get-named files for application with find-naming
fold in System bean configuration to BeanConfig
update logback default folder to prevent conflicts
@Daniel-J-Mason Daniel-J-Mason linked an issue May 15, 2023 that may be closed by this pull request
@Daniel-J-Mason Daniel-J-Mason added the enhancement New feature or request label May 15, 2023
…-repository-+-infrastructure-for-system

# Conflicts:
#	liquibase/src/main/resources/changelog/changelog-master.xml
#	message-processors/commodityv3-processor/src/main/java/io/edpn/backend/messageprocessor/commodityv3/infrastructure/persistence/mappers/CommodityEntityMapper.java
#	message-processors/commodityv3-processor/src/main/java/io/edpn/backend/messageprocessor/commodityv3/infrastructure/persistence/mappers/EconomyEntityMapper.java
#	message-processors/commodityv3-processor/src/main/java/io/edpn/backend/messageprocessor/commodityv3/infrastructure/persistence/mappers/HistoricStationCommodityMarketDatumEntityMapper.java
#	message-processors/commodityv3-processor/src/main/java/io/edpn/backend/messageprocessor/commodityv3/infrastructure/persistence/mappers/StationEntityMapper.java
#	message-processors/commodityv3-processor/src/main/java/io/edpn/backend/messageprocessor/commodityv3/infrastructure/persistence/mappers/StationStationTypeEntityMapper.java
#	message-processors/commodityv3-processor/src/main/java/io/edpn/backend/messageprocessor/commodityv3/infrastructure/persistence/mappers/StationTypeEntityMapper.java
#	message-processors/commodityv3-processor/src/main/java/io/edpn/backend/messageprocessor/commodityv3/infrastructure/persistence/mappers/SystemEntityMapper.java
@@ -1,6 +1,7 @@
management.server.port=8080
server.port=8080

spring.profiles.active=dev
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this does not belong in the main appilcation.properties. this can have unintended side effects.

either set via maven run time or environment variable. not via application.properties

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ive historically collapsed application.properties into one file that houses all of your runnable profiles.

But I can keep it going in separate files if we want to do something like application-dev.yaml

Copy link
Contributor

@pveeckhout pveeckhout May 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://reflectoring.io/spring-boot-profiles/

--> it is much easier to find properties for a certain profile an to compare them between profiles if they are split in different files. Also, the reference manual says that the multi-document syntax can lead to unexpected behavior.

They way you were doing it here, was kind of contradictory

You are setting the active profile in the same multi-document file, which defeats the purpose, as dev will always be active.

you were correctly using the `spring.config.activate.on-profile=dev, but I removed that in a previous change.

the better way is to put all the shared (and static) properties in the application.properties, and then a file per environment.

running it with the correct profile:

java -jar file.jar --spring-boot.run.profiles=production or mvn spring-boot:run -Dspring-boot.run.profiles=dev,pieter to set the correct profile.

this has the additional benefit of setting the correct profile for the logbck.xml

this means you can supply multiple profiles, where the later passed ones will overwrite properties of the previous.

you could make a application-daniel.properties, and run with profiles prod,daniel and you would run with prod properties, only overriding the once defined in application-daniel.properties

Pieter Van Eeckhout and others added 5 commits May 15, 2023 17:28
…ns to Mybatis and consolidating the initial database schema liquibase files
…n-repository-+-infrastructure-for-system

# Conflicts:
#	message-processors/commodityv3-processor/src/main/java/io/edpn/backend/messageprocessor/commodityv3/infrastructure/persistence/mappers/EconomyEntityMapper.java
#	message-processors/commodityv3-processor/src/main/java/io/edpn/backend/messageprocessor/commodityv3/infrastructure/persistence/mappers/StationStationTypeEntityMapper.java
Daniel-J-Mason and others added 5 commits May 15, 2023 19:18
13 - fixing readded mapper endpoints, renaming all repo implementatio…
…astructure-for-system' into 13-rest-domain-repository-+-infrastructure-for-system
Update logback to prevent file conflict
Add stationTypeID to commodityv3
Remove StationStationTypeEntityMapper.java
@Daniel-J-Mason Daniel-J-Mason requested a review from llamaair May 16, 2023 23:00
@pveeckhout pveeckhout changed the base branch from development to development-backup June 21, 2023 10:13
@pveeckhout pveeckhout changed the base branch from development-backup to development June 21, 2023 10:15
@pveeckhout pveeckhout deleted the 13-rest-domain-repository-+-infrastructure-for-system branch August 3, 2023 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

REST Domain repository + Infrastructure for System
4 participants