Spring Boot API Versioning

Viewed 2231

I am developing Services in Spring Boot. Now suppose I have developed 10 APIs without any version specified and release the code on production.

Now two APIs need breaking change, so I need to create new version of these two APIs.

So how should I create my code design? Should I create one base controller & then with every new version create a new controller extending main controller? Should I use interfaces? Or is there any better approach.

Also I am planning to keep only max two/three versions of API at max. Also we are hoping for not supporting old version API for too long so design should also support easy removal of old versions?

1 Answers
Related