Package org.joinfaces.servlet
Class WebFragmentRegistrationBean
java.lang.Object
org.joinfaces.servlet.WebFragmentRegistrationBean
- All Implemented Interfaces:
org.springframework.boot.web.server.WebServerFactoryCustomizer<org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory>
public class WebFragmentRegistrationBean
extends Object
implements org.springframework.boot.web.server.WebServerFactoryCustomizer<org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory>
RegistrationBean
for web-fragment.xml
files.
This is implemented as WebServerFactoryCustomizer
so it only applies to embedded servlet-containers.
When deployed as war file, the external servlet-container will find the web-fragment.xml
file.
The main feature of this class is the way it registers listeners.
They will be treated as if they were declared in a web-fragment.xml
and therefore aren't affected by the
restrictions of Section 4.4 of the Servlet Specification.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
customize
(org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory factory) List<org.springframework.boot.web.server.ErrorPage>
List<Class<? extends EventListener>>
void
setContextParams
(Map<String, String> contextParams) void
setErrorPages
(List<org.springframework.boot.web.server.ErrorPage> errorPages) void
setListeners
(List<Class<? extends EventListener>> listeners)
-
Constructor Details
-
WebFragmentRegistrationBean
public WebFragmentRegistrationBean()
-
-
Method Details
-
customize
public void customize(org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory factory) - Specified by:
customize
in interfaceorg.springframework.boot.web.server.WebServerFactoryCustomizer<org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory>
-
getListeners
-
getErrorPages
-
getContextParams
-
setListeners
-
setErrorPages
-
setContextParams
-