mardi 6 avril 2021

How can I have two implementations(test and actual) of same class in SpringBoot?

I want to have two classes that implement the same interface but one should be used when tests are run and one should execute when the actual code is run. This should be based on the environment. So, if the environment is "CI" the test implementation should be used and if the environment is "development" or "production" the actual implementation should be used. How can this be achieved using SpringBoot and by following the best practices?

Aucun commentaire:

Enregistrer un commentaire