I need a way to version my java service to be versioned like REST. I want to use the Semantic Versioning and manage my java api lifecycle same as REST. Example:- String runService(String serviceVersion, String inputToService...)
and based on the version it will call to appropriate functionality of the service.
I am thinking of loading separate versions of jar through classloader as descrived in Java, Classpath, Classloading => Multiple Versions of the same jar/project
Is there any best possible way to do this or shall I switch to REST.