クラス SecurityJackson2Modules

java.lang.ObjectSE
org.springframework.security.jackson2.SecurityJackson2Modules

@DeprecatedSE(forRemoval=true) public final class SecurityJackson2Modules extends ObjectSE
非推奨、削除予定: この API 要素は、将来のバージョンで削除される可能性があります。
Jackson 3 に基づいて 7.0 が SecurityJacksonModules を推奨
このユーティリティクラスは、クラスパス内のすべての SecurityModules を検索します。

     ObjectMapper mapper = new ObjectMapper();
     mapper.registerModules(SecurityJackson2Modules.getModules());
 
上記のコードは以下と同等です

     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());
 
導入:
4.2
  • メソッドのサマリー

    修飾子と型
    メソッド
    説明
    static void
    enableDefaultTyping(com.fasterxml.jackson.databind.ObjectMapper mapper)
    非推奨、削除予定: この API 要素は、将来のバージョンで削除される可能性があります。
    static ListSE<com.fasterxml.jackson.databind.Module>
    非推奨、削除予定: この API 要素は、将来のバージョンで削除される可能性があります。

    クラス java.lang.ObjectSE から継承されたメソッド

    clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSE
  • メソッドの詳細

    • enableDefaultTyping

      public static void enableDefaultTyping(com.fasterxml.jackson.databind.ObjectMapper mapper)
      非推奨、削除予定: この API 要素は、将来のバージョンで削除される可能性があります。
    • getModules

      public static ListSE<com.fasterxml.jackson.databind.Module> getModules(ClassLoaderSE loader)
      非推奨、削除予定: この API 要素は、将来のバージョンで削除される可能性があります。
      パラメーター:
      loader - 使用する ClassLoader
      戻り値:
      クラスパスで使用可能なセキュリティモジュールのリスト。