Relative Content

Tag Archive for javaspring-bootrestoopdesign-patterns

How to override generic method in subclass java

I am trying to refactor some code in order to reduce code duplication.
Currently I have a service that takes its own custom Payload class and returns its own Response class. And currently it is not one service class that does this but around 5 or 6. So that makes for a LOT of code duplication even though the body of the methods are literally the same, just the return type is different.