Make configuration properties public
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user