Concerns about migrating controller to Jmix

I have a Spring Boot Application(based on Spring Boot 2.1.7). I take it from other people. The application was design without thinking of cluster and upgrading. I want to use Jmix to revamp it.

The application only provides Restful APIs, the good thing for it is it can generate Swagger style API documents, so when I use Jmix to revamp it, I hope Jmix can also generate the API document.

Most of the Restful APIs are protected by user token. The token was generated after user logs in.

The Restful APIs are provided through Spring MVC controllers. I want to keep the URL of the API, I want to move the controllers to Jmix as well.

My problems are

  1. How Jmix generates Rest APIs documents if I move the controllers from my original Spring Boot Application to Jmix?
  2. How can I make the controller rest api protected by user token in Jmix.

Hi,

Actually, Jmix applications are Spring Boot applications, so anything you could do in regular Spring Boot app you can do in Jmix app as well.

I think you may try using standard tools for swagger documentaion, e.g. springfox.

Protecting custom controllers with Jmix OAuth token is described in the documentation.

1 Like