I have one requirement to indicate the user that they are using a development environment or test environment or production environment on UI. I need suggestion on this which will be more robust and requires less maintenance.
Thanks in advance.
I have one requirement to indicate the user that they are using a development environment or test environment or production environment on UI. I need suggestion on this which will be more robust and requires less maintenance.
Thanks in advance.
One option is to use the Spring Profiles, one for each environment that you have.
For example you can have profiles for: development, qa, uat and production and the only that you need to pass to your application is a property like
-Dspring.profiles.active="<<environment_that_you_want>>"
Then to show on your views (if you're using spring mvc and tymeleaf) you can follow this explanation
Hope it helps.