2

I know there is a similar kind of question exist but if works only for glassfish server.

Listing all deployed rest endpoints (spring-boot, jersey)

Is it possible to list all my configured rest-endpoints with spring boot? The actuator lists all existing paths on startup, I want something similar for my custom services, so I can check on startup if all paths are configured correctly and use this info for client calls.

How do I do this? I use @Path/@GET annotations on my service beans and register them via ResourceConfig#registerClasses.

Is there a way to query the Config for all Paths?

Update2: I want to have something like

GET /rest/mycontroller/info
POST /res/mycontroller/update

...

Akhil Surapuram
  • 654
  • 1
  • 8
  • 22
  • See [https://stackoverflow.com/a/43543204/1101512](https://stackoverflow.com/a/43543204/1101512). This response to another similar question might help. – Sudhir Aug 27 '19 at 14:15

2 Answers2

0

In my opinion, you are already using the right tool (actuator) to answer to your request. Actuator gives you all the rest method running and you can configure it on your own, by disabling/enabling specific endpoints

If you have a look on the documentationprobably it can help you.

In any case, the default configuration of actuator display the endpoints (built-in in Intellij for your development).

Jon Leb
  • 37
  • 1
  • 9
0

This can be easily done via swagger.

After configuring your server with swagger. you can use /v2/api-docs to retrieve all your API endpoints.

you can also use swagger-UI to test endpoints like postman.

Akhil Surapuram
  • 654
  • 1
  • 8
  • 22