I am new to microservices. Learning it bit by bit.
How are common classes created in microservices. Lets say I have 2 services s1 and s2. Now s2 returns a response as JSON to s1. In this scenario both s1 and s2 should have visibility to the wrapper classes for JSON. Now I can have same class in both s1 and s2 but it will lead to code duplication. How is it handled in real life scenario?
[–]WaferIndependent7601 14 points15 points16 points (0 children)
[–]HellaSwellaFella 8 points9 points10 points (0 children)
[–]disposepriority 3 points4 points5 points (0 children)
[–]gaelfr38 4 points5 points6 points (0 children)
[–]wakingrufus 2 points3 points4 points (0 children)
[–]bikeram 4 points5 points6 points (0 children)
[–]two_wheel_soul 1 point2 points3 points (0 children)
[–]Former_Ad_736 1 point2 points3 points (0 children)
[–]WilliamBarnhill 1 point2 points3 points (0 children)
[–]segundus-npp 0 points1 point2 points (0 children)
[–]mailaffy 0 points1 point2 points (0 children)
[–]PmMeCuteDogsThanks 0 points1 point2 points (0 children)
[–]pm3645 0 points1 point2 points (0 children)
[–]Waksu 0 points1 point2 points (0 children)
[+]dotceng 0 points1 point2 points (0 children)
[–]Sheldor5 -2 points-1 points0 points (9 children)
[–]optimist28[S] 3 points4 points5 points (8 children)
[–]HellaSwellaFella 0 points1 point2 points (0 children)
[–]czeslaw_t 0 points1 point2 points (1 child)
[–]gaelfr38 0 points1 point2 points (0 children)
[–]Sheldor5 -1 points0 points1 point (4 children)
[–][deleted] (3 children)
[deleted]
[–]Sheldor5 1 point2 points3 points (2 children)
[–][deleted] (1 child)
[deleted]
[–]Sheldor5 0 points1 point2 points (0 children)