Class WhoMappingCheck
java.lang.Object
org.jwcarman.who.spring.security.web.WhoMappingCheck
- All Implemented Interfaces:
org.springframework.beans.factory.SmartInitializingSingleton
public final class WhoMappingCheck
extends Object
implements org.springframework.beans.factory.SmartInitializingSingleton
Fails startup when who's controllers would not answer where who's sign-in filters, logout, public
paths and error handling expect them: at
WhoPaths.of(String). Each of who's own controller
mappings declared under WhoPaths.MAPPING must resolve to one of its declared paths there
(an application's controller that uses the constant is not checked), so a path prefix the
application puts on its controllers, a WhoPaths bean whose root is not
who.base-path, or a spring.mvc.servlet.path other than / is refused, naming the
mapping.-
Constructor Summary
ConstructorsConstructorDescriptionWhoMappingCheck(WhoPaths paths, org.springframework.beans.factory.ObjectProvider<org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping> mappings, String servletPath) Creates the check. -
Method Summary
-
Constructor Details
-
WhoMappingCheck
public WhoMappingCheck(WhoPaths paths, org.springframework.beans.factory.ObjectProvider<org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping> mappings, String servletPath) Creates the check.- Parameters:
paths- who's base pathmappings- Spring MVC's annotation handler mappings, read once every bean existsservletPath- the dispatcher servlet's path,spring.mvc.servlet.path
-
-
Method Details
-
afterSingletonsInstantiated
public void afterSingletonsInstantiated()- Specified by:
afterSingletonsInstantiatedin interfaceorg.springframework.beans.factory.SmartInitializingSingleton
-