Skip to content

Latest commit

 

History

History
18 lines (16 loc) · 1.39 KB

README.md

File metadata and controls

18 lines (16 loc) · 1.39 KB

About

This demo app is designed to be able to switch between a MongoDB persistence layer and a SQL persistence layer. The database engine is determined automatically by the datasource configured in application.properties:

  1. If spring.data.mongodb.database is present in application.properties then we're dealing with a MongoDB engine
  2. Else if spring.datasource.url is present then we're dealing with a SQL engine.

TODOs:

  1. Currently the app is stoppping imediatelly after starting even with the Scheduled component being implemented
  2. It seems like no repositories are being registered (but maybe they don't have time to be registerered)
  3. Application starts correctly on Mongo DB
  4. Application starts correctly on SQL
  5. Write integration tests that save data in the repository
  6. Write code that performs db operations on startup to demo usability

Resources:

  1. https://www.baeldung.com/spring-component-scanning
  2. https://www.baeldung.com/the-persistence-layer-with-spring-and-jpa
  3. https://docs.spring.io/spring-boot/docs/current/reference/html/using-spring-boot.html#using-boot-using-springbootapplication-annotation