try the registered beans , then the handler
This commit is contained in:
parent
a011f44d39
commit
ea9c663ae1
1 changed files with 5 additions and 1 deletions
|
@ -209,7 +209,11 @@ public class KeycloakSpringBootConfiguration {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
WebAppContext webAppContext = (WebAppContext) server.getHandler();
|
WebAppContext webAppContext = server.getBean(WebAppContext.class);
|
||||||
|
//if not found as registered bean let's try the handler
|
||||||
|
if(webAppContext==null){
|
||||||
|
webAppContext = (WebAppContext) server.getHandler();
|
||||||
|
}
|
||||||
|
|
||||||
ConstraintSecurityHandler securityHandler = new ConstraintSecurityHandler();
|
ConstraintSecurityHandler securityHandler = new ConstraintSecurityHandler();
|
||||||
securityHandler.setConstraintMappings(jettyConstraintMappings);
|
securityHandler.setConstraintMappings(jettyConstraintMappings);
|
||||||
|
|
Loading…
Reference in a new issue