Package org.eclipse.microprofile.config.inject

# Annotation Type ConfigProperties

@Target({METHOD,FIELD,PARAMETER,TYPE}) @Retention(RUNTIME) @Documented @Qualifier public @interface ConfigProperties
Retrieve a number of related configuration properties with the specified prefix into a property class. This class should contain a zero-arg constructor. Otherwise, non-portable behaviour occurs.

## Example

     @ConfigProperties(prefix = "server")
     @Dependent
     public class MyServer {
         public String host; // maps the property name server.host
         public int port; // maps to the property name server.port
         private String context; // maps to the property name server.context
         @ConfigProperty(name = "old.location")
         public String location; // maps to the property name server.old.location
         public String getContext() {
             return context;
         }
     }

Since:
  2.0
Author:
  Emily Jiang

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static final class`
`ConfigProperties.Literal`
Support inline instantiation of the `ConfigProperties` qualifier.

## Optional Element Summary

Optional Elements
Modifier and Type
Optional Element
Description
`String`
`prefix`
The prefix of the configuration properties.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`UNCONFIGURED_PREFIX`

## Field Details

### UNCONFIGURED_PREFIX

static final String UNCONFIGURED_PREFIX

See Also:
  - Constant Field Values

## Element Details

### prefix

String prefix
The prefix of the configuration properties.

Returns:
  the configuration property prefix

Default:
  "org.eclipse.microprofile.config.inject.configproperties.unconfiguredprefix"