Class SecurityJackson2Modules
java.lang.Object
org.springframework.security.jackson2.SecurityJackson2Modules
Deprecated, for removal: This API element is subject to removal in a future version.
This utility class will find all the SecurityModules in classpath.
ObjectMapper mapper = new ObjectMapper();
mapper.registerModules(SecurityJackson2Modules.getModules());
Above code is equivalent to
ObjectMapper mapper = new ObjectMapper();
mapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As.PROPERTY);
mapper.registerModule(new CoreJackson2Module());
mapper.registerModule(new CasJackson2Module());
mapper.registerModule(new WebJackson2Module());
mapper.registerModule(new WebServletJackson2Module());
mapper.registerModule(new WebServerJackson2Module());
mapper.registerModule(new OAuth2ClientJackson2Module());
mapper.registerModule(new Saml2Jackson2Module());
- Since:
- 4.2
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidenableDefaultTyping(com.fasterxml.jackson.databind.ObjectMapper mapper) Deprecated, for removal: This API element is subject to removal in a future version.static List<com.fasterxml.jackson.databind.Module>getModules(ClassLoader loader) Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Details
-
enableDefaultTyping
public static void enableDefaultTyping(com.fasterxml.jackson.databind.ObjectMapper mapper) Deprecated, for removal: This API element is subject to removal in a future version. -
getModules
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
loader- the ClassLoader to use- Returns:
- List of available security modules in classpath.
-
SecurityJacksonModulesbased on Jackson 3