1

A customer has requested that we add specific endpoints for their integration tests (mainly to set up the system and then delete this data).

They only need these endpoints to be available for test so I am looking for a way to hide/disable them in production (or whatever environment).

I was thinking to use a configuration parameter for that but how to use it? I don't want each endpoint to check the flag. Since the implementation of these endpoints will be in a separate service/controller, is there a way to disable it? Or can I use a filter?

algiogia
  • 936
  • 2
  • 14
  • 40
  • 3
    Besides the technique in the duplicate, you can also use a configuration enabling the endpoint and @SpringProfile to enable/disable it. – tkruse Dec 20 '17 at 13:40

0 Answers0