commit
aeae740926
|
@ -75,7 +75,6 @@ public final class SecurityJackson2Modules {
|
|||
|
||||
private static final List<String> securityJackson2ModuleClasses = Arrays.asList(
|
||||
"org.springframework.security.jackson2.CoreJackson2Module",
|
||||
"org.springframework.security.cas.jackson2.CasJackson2Module",
|
||||
"org.springframework.security.web.jackson2.WebJackson2Module",
|
||||
"org.springframework.security.web.server.jackson2.WebServerJackson2Module");
|
||||
|
||||
|
@ -89,6 +88,8 @@ public final class SecurityJackson2Modules {
|
|||
|
||||
private static final String saml2Jackson2ModuleClass = "org.springframework.security.saml2.jackson2.Saml2Jackson2Module";
|
||||
|
||||
private static final String casJackson2ModuleClass = "org.springframework.security.cas.jackson2.CasJackson2Module";
|
||||
|
||||
private static final boolean webServletPresent;
|
||||
|
||||
private static final boolean oauth2ClientPresent;
|
||||
|
@ -99,6 +100,8 @@ public final class SecurityJackson2Modules {
|
|||
|
||||
private static final boolean saml2JacksonPresent;
|
||||
|
||||
private static final boolean casJacksonPresent;
|
||||
|
||||
static {
|
||||
ClassLoader classLoader = SecurityJackson2Modules.class.getClassLoader();
|
||||
webServletPresent = ClassUtils.isPresent("jakarta.servlet.http.Cookie", classLoader);
|
||||
|
@ -107,6 +110,7 @@ public final class SecurityJackson2Modules {
|
|||
javaTimeJacksonPresent = ClassUtils.isPresent(javaTimeJackson2ModuleClass, classLoader);
|
||||
ldapJacksonPresent = ClassUtils.isPresent(ldapJackson2ModuleClass, classLoader);
|
||||
saml2JacksonPresent = ClassUtils.isPresent(saml2Jackson2ModuleClass, classLoader);
|
||||
casJacksonPresent = ClassUtils.isPresent(casJackson2ModuleClass, classLoader);
|
||||
}
|
||||
|
||||
private SecurityJackson2Modules() {
|
||||
|
@ -160,6 +164,9 @@ public final class SecurityJackson2Modules {
|
|||
if (saml2JacksonPresent) {
|
||||
addToModulesList(loader, modules, saml2Jackson2ModuleClass);
|
||||
}
|
||||
if (casJacksonPresent) {
|
||||
addToModulesList(loader, modules, casJackson2ModuleClass);
|
||||
}
|
||||
return modules;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue