类 InitUtils

java.lang.Object
com.alibaba.nacos.client.naming.utils.InitUtils

public class InitUtils extends Object
Init utils.
作者:
liaochuntao, deshao
  • 构造器详细资料

    • InitUtils

      public InitUtils()
  • 方法详细资料

    • initNamespaceForNaming

      public static String initNamespaceForNaming(com.alibaba.nacos.client.env.NacosClientProperties properties)
      Add a difference to the name naming. This method simply initializes the namespace for Naming. Config initialization is not the same, so it cannot be reused directly.
      参数:
      properties - properties
      返回:
      namespace
    • initWebRootContext

      public static void initWebRootContext(com.alibaba.nacos.client.env.NacosClientProperties properties)
      Init web root context.
      参数:
      properties - properties
      从以下版本开始:
      1.4.1
    • initSerialization

      public static void initSerialization()
      Register subType for serialization.

      Now these subType implementation class has registered in static code. But there are some problem for classloader. The implementation class will be loaded when they are used, which will make deserialize before register.

      子类实现类中的静态代码串中已经向Jackson进行了注册,但是由于classloader的原因,只有当 该子类被使用的时候,才会加载该类。这可能会导致Jackson先进性反序列化,再注册子类,从而导致 反序列化失败。