public class Configuration
extends java.lang.Object
name: "Random Person" age: 43 # ... etc ...And a configuration like this:
public class ExampleConfiguration extends Configuration {
\@NotNull
private String name;
\@Min(1)
\@Max(120)
private int age;
\@JsonProperty
public String getName() {
return name;
}
\@JsonProperty
public void setName(String name) {
this.name = name;
}
\@JsonProperty
public int getAge() {
return age;
}
\@JsonProperty
public void setAge(int age) {
this.age = age;
}
}
Dropwizard will parse the given YAML file and provide an ExampleConfiguration instance
to your application whose getName() method will return "Random Person" and whose
getAge() method will return 43.| Constructor | Description |
|---|---|
Configuration() |
| Modifier and Type | Method | Description |
|---|---|---|
io.dropwizard.logging.LoggingFactory |
getLoggingFactory() |
Returns the logging-specific section of the configuration file.
|
io.dropwizard.metrics.MetricsFactory |
getMetricsFactory() |
|
ServerFactory |
getServerFactory() |
Returns the server-specific section of the configuration file.
|
void |
setLoggingFactory(io.dropwizard.logging.LoggingFactory factory) |
Sets the logging-specific section of the configuration file.
|
void |
setMetricsFactory(io.dropwizard.metrics.MetricsFactory metrics) |
|
void |
setServerFactory(ServerFactory factory) |
Sets the HTTP-specific section of the configuration file.
|
java.lang.String |
toString() |
public ServerFactory getServerFactory()
public void setServerFactory(ServerFactory factory)
public io.dropwizard.logging.LoggingFactory getLoggingFactory()
public void setLoggingFactory(io.dropwizard.logging.LoggingFactory factory)
public io.dropwizard.metrics.MetricsFactory getMetricsFactory()
public void setMetricsFactory(io.dropwizard.metrics.MetricsFactory metrics)
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2018. All rights reserved.