Detect DispatcherServlets registered via ServletRegistrationBean
Previously, when a DispatcherServlet was registered via a ServletRegistrationBean, the mappings endpoint did not expose any information about it as it wasn't detected. This commit fixes the detection of available DispatcherServlets in the context so that the mappings endpoint include them all. Closes gh-13186
This commit is contained in:
@@ -100,14 +100,6 @@ public class ServletRegistrationBean<T extends Servlet>
|
||||
this.urlMappings.addAll(Arrays.asList(urlMappings));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the servlet being registered.
|
||||
* @return the servlet
|
||||
*/
|
||||
protected T getServlet() {
|
||||
return this.servlet;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the servlet to be registered.
|
||||
* @param servlet the servlet
|
||||
@@ -117,6 +109,15 @@ public class ServletRegistrationBean<T extends Servlet>
|
||||
this.servlet = servlet;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the servlet being registered.
|
||||
* @return the servlet
|
||||
* @since 2.0.4
|
||||
*/
|
||||
public T getServlet() {
|
||||
return this.servlet;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the URL mappings for the servlet. If not specified the mapping will default to
|
||||
* '/'. This will replace any previously specified mappings.
|
||||
|
||||
Reference in New Issue
Block a user