Make configuration properties public

This commit is contained in:
Moritz Halbritter
2022-07-20 16:49:42 +02:00
parent ea46bc8f58
commit ab4d9cda4e
3 changed files with 26 additions and 26 deletions

View File

@@ -7,7 +7,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.util.unit.DataSize;
@ConfigurationProperties(prefix = "app")
class AppProperties {
public class AppProperties {
private String string;
@@ -19,43 +19,43 @@ class AppProperties {
private Nested nested = new Nested();
List<String> getStringList() {
public List<String> getStringList() {
return stringList;
}
void setStringList(List<String> stringList) {
public void setStringList(List<String> stringList) {
this.stringList = stringList;
}
List<Nested> getNestedList() {
public List<Nested> getNestedList() {
return nestedList;
}
void setNestedList(List<Nested> nestedList) {
public void setNestedList(List<Nested> nestedList) {
this.nestedList = nestedList;
}
Nested getNested() {
public Nested getNested() {
return nested;
}
void setNested(Nested nested) {
public void setNested(Nested nested) {
this.nested = nested;
}
String getString() {
public String getString() {
return string;
}
void setString(String string) {
public void setString(String string) {
this.string = string;
}
DataSize getDataSize() {
public DataSize getDataSize() {
return dataSize;
}
void setDataSize(DataSize dataSize) {
public void setDataSize(DataSize dataSize) {
this.dataSize = dataSize;
}
@@ -65,15 +65,15 @@ class AppProperties {
+ ", nestedList=" + nestedList + ", nested=" + nested + '}';
}
static class Nested {
public static class Nested {
private int aInt;
int getaInt() {
public int getaInt() {
return aInt;
}
void setaInt(int aInt) {
public void setaInt(int aInt) {
this.aInt = aInt;
}

View File

@@ -6,7 +6,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.util.unit.DataSize;
@ConfigurationProperties(prefix = "app.ctor")
class AppPropertiesCtor {
public class AppPropertiesCtor {
private final String string;
@@ -18,7 +18,7 @@ class AppPropertiesCtor {
private final Nested nested;
AppPropertiesCtor(String string, DataSize dataSize, List<String> stringList, List<Nested> nestedList,
public AppPropertiesCtor(String string, DataSize dataSize, List<String> stringList, List<Nested> nestedList,
Nested nested) {
this.string = string;
this.dataSize = dataSize;
@@ -27,23 +27,23 @@ class AppPropertiesCtor {
this.nested = nested;
}
String getString() {
public String getString() {
return string;
}
DataSize getDataSize() {
public DataSize getDataSize() {
return dataSize;
}
List<String> getStringList() {
public List<String> getStringList() {
return stringList;
}
List<Nested> getNestedList() {
public List<Nested> getNestedList() {
return nestedList;
}
Nested getNested() {
public Nested getNested() {
return nested;
}
@@ -53,15 +53,15 @@ class AppPropertiesCtor {
+ stringList + ", nestedList=" + nestedList + ", nested=" + nested + '}';
}
static class Nested {
public static class Nested {
private final int aInt;
Nested(int aInt) {
public Nested(int aInt) {
this.aInt = aInt;
}
int getaInt() {
public int getaInt() {
return aInt;
}

View File

@@ -6,8 +6,8 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.util.unit.DataSize;
@ConfigurationProperties(prefix = "app.record")
record AppPropertiesRecord(String string, DataSize dataSize, List<String> stringList, List<Nested> nestedList,
public record AppPropertiesRecord(String string, DataSize dataSize, List<String> stringList, List<Nested> nestedList,
Nested nested) {
record Nested(int aInt) {
public record Nested(int aInt) {
}
}