Problem:
I have two micro services (in Spring Boot) published in Bluemix's Api Connect. I want to assign a base path to each one so that we have a way to separate them. I.E.:
Path to API 1: https://api.us.apiconnect.ibmcloud.com/[organization]/[catalog]/api1/[endpoint-of-api1]
Path to API 2: https://api.us.apiconnect.ibmcloud.com/[organization]/[catalog]/api2/[endpoint-of-api2]
My solution:
Assign a context path to each Api in their application.yml file:
server:
contextPath: /api1
Even though this works, it doesn't seem right to have a base path for the entire server, when the microservice shouldn't be aware of its external context (the reason for a base path is exclusively to have a separation in Api Connect)
Any ideas?