Interface OssConverter<S,T>

All Superinterfaces:
org.springframework.core.convert.converter.Converter<S,T>

public interface OssConverter<S,T> extends org.springframework.core.convert.converter.Converter<S,T>

Description: 统一转换器定义

Author:
: gengwei.zheng
Date:
: 2023/8/16 13:00
  • Method Summary

    Modifier and Type
    Method
    Description
    default T
    convert(S source)
    实体转换
    getInstance(S source)
    获取最终生成对象实例
    void
    prepare(S source, T instance)
    参数准备

    Methods inherited from interface org.springframework.core.convert.converter.Converter

    andThen
  • Method Details

    • prepare

      void prepare(S source, T instance)
      参数准备
      Parameters:
      source - 源对象
      instance - 转换后的对象
    • getInstance

      T getInstance(S source)
      获取最终生成对象实例
      Parameters:
      source - 源对象。传递源对象,方便参数设置
      Returns:
      转换后的对象实例
    • convert

      default T convert(S source)
      实体转换
      Specified by:
      convert in interface org.springframework.core.convert.converter.Converter<S,T>
      Parameters:
      source - 统一定义请求参数
      Returns:
      转换后的对象实例