سؤال

custc.krtdocument.errors=/properties/error.properties,20

I found this in one of the property files in my java web project, I wonder In above what is the meaning of putting ",20" there??

هل كانت مفيدة؟

المحلول

It indicates list of values or Lists and arrays

Using ',' Commons Configuration has the ability to return easily a list of values. For example a properties file can contain a list of comma separated values

colors.pie = #FF0000, #00FF00, #0000FF

Using Java properties class

  private String[] errs = prop.getProperty("custc.krtdocument.errors").split[","];

نصائح أخرى

It usually indicates that custc.krtdocument.errors will be an array type

@Value("${custc.krtdocument.errors}")
private String[] errors;
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top