All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nervousync.annotations.beans.OutputConfig Maven / Gradle / Ivy

There is a newer version: 1.2.1
Show newest version
package org.nervousync.annotations.beans;

import org.nervousync.commons.Globals;
import org.nervousync.utils.StringUtils;

import java.lang.annotation.*;

/**
 * 

Annotation for data output config

* Configure output data type, formatted output string and string encoding *

标注用于数据输出的配置

* 定义输出的数据类型,是否格式化输出的字符串以及输出字符串的编码集 * * @author Steven Wee [email protected] * @version $Revision: 1.0.0 $ $Date: Apr 15, 2023 14:27:15 $ */ @Inherited @Documented @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE}) public @interface OutputConfig { /** *

Output string type

* Default is SIMPLE, base64 encoded byte arrays. Other types: JSON/XML/YAML *

输出字符串类型

* 默认值为SIMPLE,使用Base64编码的字节数组。可选类型包括:JSON/XML/YAML * * @see org.nervousync.utils.StringUtils.StringType * @return Enumeration value type of StringUtils.StringType * StringUtils.StringType枚举类型 */ StringUtils.StringType type() default StringUtils.StringType.SIMPLE; /** *

Format output string status

* true for format output string, eg: add break line, add indent etc., false for output string in one line *

格式化输出字符串状态

* true格式化输出的字符串,添加换行及缩进等。false在同一行输出所有数据 * * @return Formatted status * 格式化输出状态 */ boolean formatted() default false; /** *

Output string encoding

* Default is UTF-8 *

输出字符串编码集

* 默认值为UTF-8 * * @return String encoding * 字符串编码集 */ String encoding() default Globals.DEFAULT_ENCODING; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy