Skip to main content

Global Comparison Configuration

AREX has default configurations for comparison, such as excluding the comparison of select operations in the database. To facilitate configuration and management, AREX provides a global configuration approach. Users can modify the docker-compose.yml file and add the following startup parameters to the AREX-API Service to control the comparison configuration of the system.

# For "yyyy-MM-dd HH:mm:ss.SSSSSS","yyyy-MM-dd HH:mm:ss.SSS",
# "HH:mm:ss.SSSSSS", "HH:mm:ss.SSS",
# "yyyy-MM-dd'T'HH:mm:ss.SSSXXX", "yyyy-MM-dd'T'HH:mm:ss.SSSZ" and other time formats
# Ignore the precision of the time field in milliseconds. When comparing time fields, the portion that is accurate after the specified number of milliseconds is ignored.
-Darex.compare.ignoredTimePrecisionMillis=2000

# Whether to convert the message key to lowercase. When the value is true, the key in the message will be converted to lowercase; when the value is false, no conversion.
-Darex.compare.nameToLower=true

# Whether to consider the value of null, empty string ("") or empty array ([]) as equal during comparison. When the value is `true`, the values will be considered equal during comparison; when the value is `false`, they will not be considered equal.
-Darex.compare.nullEqualsEmpty=true

# Whether to ignore the comparison of select statements in the database. When the value is `true`, the comparison of select statements will be ignored; when the value is `false`, they will not be ignored.
-Darex.compare.selectIgnoreCompare=true

# Whether to compare only the fields with the same name during database operation comparison.
# When the value is `true`, AREX will only compare the fields with the same name in the database operations, and other fields will be ignored.
# When the value is `false`, the system will compare all fields, regardless of whether their names are the same.
-DonlyCompareCoincidentColumn=true

# Whether to compare the UUID field. When the value is `true`, the comparison of the UUID field will be ignored; when the value is `false`, it will not be ignored.
-Darex.compare.uuidIgnore=true

# No comparison on the configured field names, separated by ",".
-Darex.compare.ignoreNodeSet='time,uuid'