类 JsonFileItemWriter<T>

    • 构造器详细资料

      • JsonFileItemWriter

        public JsonFileItemWriter​(org.springframework.core.io.Resource resource,
                                  JsonObjectMarshaller<T> jsonObjectMarshaller)
        Create a new JsonFileItemWriter instance.
        参数:
        resource - to write json data to
        jsonObjectMarshaller - used to marshal object into json representation
    • 方法详细资料

      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        Assert that mandatory properties (jsonObjectMarshaller) are set.
        抛出:
        java.lang.Exception
        另请参阅:
        InitializingBean.afterPropertiesSet()
      • doWrite

        public java.lang.String doWrite​(java.util.List<? extends T> items)
        从类复制的说明: AbstractFileItemWriter
        Write out a string of items followed by a "new line", where the format of the new line separator is determined by the underlying operating system.
        指定者:
        doWrite 在类中 AbstractFileItemWriter<T>
        参数:
        items - to be written
        返回:
        written lines