I have an app component which has included rest addon and some custom RestController and configurations in its rest-dispatcher-spring.xml file.
When I include this app component into a new project, how can I “inherit” the custom RestControllers and rest-dispatcher-spring configurations into the new project ?
E.g. I configured SwaggerConfig in the app component but this is not available in the new project.
I thought if I put the following line into my new web-app.properties it will include all the app components rest-dispatch-spring configurations.
Over the weekend I looked at the REST Addon source code in Github and I noticed that in the app-context.xml file in the project, there is another line in the file which is not in my typical app descriptor.
I assume that this will enable the configurations in the rest-dispatcher-spring.xml in the add-on to be “inherited” into the new project. So I included a similar line in the app component module. With this line, I find that I don’t need to copy all the customized configurations in the app component rest-dispatcher-spring.xml into the new project. I only need to add the line:
in the new project’s rest-dispatcher-spring.xml to scan for new project’s controllers to be added, in addition to the app component controllers and all its customization.