Annotation Interface ConfigSource


@Retention(RUNTIME) @Target(TYPE) public @interface ConfigSource
Русский: Аннотация для создания пользовательских классов отражения конфигурации в рамках приложении. Впоследствии интерфейс может быть использован для внедрения как зависимость.
English: Annotation for creating custom configuration mapped classes within an application. The interface can be then used for dependency injection.

Пример / Example:
  
 @ConfigSource("path.to.config")
 public interface MyConfig {

     @Nullable
     String user();

     default String password() {
         return "admin";
     }
 }
  
 
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
     
  • Element Details

    • value

      String value
      Returns:
      Русский: Путь к части отображаемой конфигурации внутри файла конфигурации
      English: Path to the part of the mapped configuration inside the configuration file