Example usage for org.springframework.security.jackson2 SecurityJackson2Modules getModules

List of usage examples for org.springframework.security.jackson2 SecurityJackson2Modules getModules

Introduction

In this page you can find the example usage for org.springframework.security.jackson2 SecurityJackson2Modules getModules.

Prototype

public static List<Module> getModules(ClassLoader loader) 

Source Link

Usage

From source file:sample.config.SessionConfig.java

/**
 * Customized {@link ObjectMapper} to add mix-in for class that doesn't have default
 * constructors// w  ww .java2 s.  c o  m
 *
 * @return the {@link ObjectMapper} to use
 */
ObjectMapper objectMapper() {
    ObjectMapper mapper = new ObjectMapper();
    mapper.registerModules(SecurityJackson2Modules.getModules(this.loader));
    return mapper;
}