forked from apache/pulsar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feature][pulsar-broker-common]Move additional servlet module to puls…
…ar broker common module (apache#9164) ### Motivation * Currently, after merging this or apache#8067, the pulsar-proxy module already supports loading custom web routes, which is also needed in the `pulsar-broker` and `pulsar-function` modules, so consider moving this functionality to the `pulsar-broker-common` module as a generic module. ### Modifications * Update the class name to remove the proxy prefix * Move to the module How to use this generic module 1. add configuration `additionalServletDirectory` and `additionalServlets` to the configuration file 2. Call the following code ``` Collection<AdditionalServletWithClassLoader> additionalServletCollection = service.getProxyAdditionalServlets().getServlets().values(); for (AdditionalServletWithClassLoader servletWithClassLoader : additionalServletCollection) { servletWithClassLoader.loadConfig(config); server.addServlet(servletWithClassLoader.getBasePath(), servletWithClassLoader.getServletHolder(), Collections.emptyList(), config.isAuthenticationEnabled()); log.info("proxy add additional servlet basePath {} ", servletWithClassLoader.getBasePath()); } ```
- Loading branch information
Showing
16 changed files
with
250 additions
and
216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.