Skip to content

Instantly share code, notes, and snippets.

@eliasnogueira
Created December 21, 2020 20:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eliasnogueira/977394fdde5184311fd4668ed4e117f7 to your computer and use it in GitHub Desktop.
Save eliasnogueira/977394fdde5184311fd4668ed4e117f7 to your computer and use it in GitHub Desktop.
Example of properties merge in the same model using Owner
import org.aeonbits.owner.Config;
@Config.LoadPolicy(Config.LoadType.MERGE)
@Config.Sources({
"classpath:general.properties",
"classpath:grid.properties"
})
public interface GeneralConfig extends Config {
String target();
@Config.Key("url.base")
String url();
int timeout();
Boolean headless();
@Config.Key("grid.url")
String gridUrl();
@Config.Key("grid.port")
String gridPort();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment