Create service versions rest

2

I'm creating rest services with Java (Jersey).

This service tends to grow and evolve, and may undergo changes in existing routines, so I believe the best route would be to create production versions so clients do not break with the changes.

Currently I deploy the system in Tomcat, being access through an example URL:

http://www.meudominio.com.br:8180/minhaApi/recurso

I think the ideal would be something like:

http://www.meudominio.com.br:8180/minhaApi/v1/recurso
http://www.meudominio.com.br:8180/minhaApi/v2/recurso

How to do this?

    
asked by anonymous 05.07.2016 / 20:09

1 answer

-1

Versions of an application are not managed programmatically, but rather through version control systems (GIT, SVN, ...). When you need to close a version that should not be modified and is stable you create a tag from that version. So you can generate your published artifact in production from this tag and evolve your code without fear that it will break what is being used by the client. With each new stable release, a new tag would be created and you would evolve your project.

If you do not have experience with version control, I recommend using git: link

    
30.08.2016 / 00:17