Skip to content

Commit cdbf74f

Browse files
committed
Document missing duration unit in GrpcClientProperties
See gh-49722 Closes gh-49879
1 parent 0acd01d commit cdbf74f

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

module/spring-boot-grpc-client/src/main/java/org/springframework/boot/grpc/client/autoconfigure/GrpcClientProperties.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@
2525

2626
import org.springframework.boot.context.properties.ConfigurationProperties;
2727
import org.springframework.boot.context.properties.bind.Name;
28+
import org.springframework.boot.convert.DataSizeUnit;
2829
import org.springframework.boot.convert.DurationUnit;
2930
import org.springframework.util.unit.DataSize;
31+
import org.springframework.util.unit.DataUnit;
3032

3133
/**
3234
* Configuration properties for gRPC clients.
@@ -167,9 +169,11 @@ public Metadata getMetadata() {
167169
public static class Message {
168170

169171
/**
170-
* Maximum message size allowed to be received by the channel. Set to '-1'
171-
* to use the highest possible limit (not recommended).
172+
* Maximum message size allowed to be received by the channel. If a data
173+
* size suffix is not specified, bytes will be used. Set to '-1' to use
174+
* the highest possible limit (not recommended).
172175
*/
176+
@DataSizeUnit(DataUnit.BYTES)
173177
private DataSize maxSize = DataSize.ofBytes(4194304);
174178

175179
public DataSize getMaxSize() {
@@ -188,9 +192,11 @@ public void setMaxSize(DataSize maxSize) {
188192
public static class Metadata {
189193

190194
/**
191-
* Maximum metadata size allowed to be received by the channel. Set to
192-
* '-1' to use the highest possible limit (not recommended).
195+
* Maximum metadata size allowed to be received by the channel. If a data
196+
* size suffix is not specified, bytes will be used.Set to '-1' to use the
197+
* highest possible limit (not recommended).
193198
*/
199+
@DataSizeUnit(DataUnit.BYTES)
194200
private DataSize maxSize = DataSize.ofBytes(8192);
195201

196202
public DataSize getMaxSize() {

0 commit comments

Comments
 (0)