vendredi 30 décembre 2016

Design pattern for microservice's client

I am using spring-cloud to build client of microservice that would call a specific service depending on the params I will receive in my rest controller method.

I am using Java switch instruction like that :

    switch(param)
      case param1:
                 call service1;
      case param2:
                 call service2;

etc...

I would like to know if there is a specific design pattern that will help me to code this functionnality more sweety.

Thanks.

(sorry for my bad english)

Aucun commentaire:

Enregistrer un commentaire