-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#64 Prepare file-based configuration
- Loading branch information
Showing
4 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
builder/src/main/java/dvoraka/archbuilder/BuilderProperties.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package dvoraka.archbuilder; | ||
|
||
import org.springframework.boot.context.properties.ConfigurationProperties; | ||
|
||
@ConfigurationProperties(prefix = "builder") | ||
public class BuilderProperties { | ||
|
||
private String defaultString = "Default"; | ||
|
||
private Service service = new Service(); | ||
|
||
|
||
public String getDefaultString() { | ||
return defaultString; | ||
} | ||
|
||
public void setDefaultString(String defaultString) { | ||
this.defaultString = defaultString; | ||
} | ||
|
||
public Service getService() { | ||
return service; | ||
} | ||
|
||
public void setService(Service service) { | ||
this.service = service; | ||
} | ||
|
||
public static class Service { | ||
|
||
private String name; | ||
|
||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters