javax.validation.constraints.Max.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(5.6k)|赞(0)|评价(0)|浏览(207)

本文整理了Java中javax.validation.constraints.Max.<init>()方法的一些代码示例,展示了Max.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Max.<init>()方法的具体详情如下:
包路径:javax.validation.constraints.Max
类名称:Max
方法名:<init>

Max.<init>介绍

暂无

代码示例

代码示例来源:origin: prestodb/presto

@Min(2)
@Max(1000)
public int getMaxOpenSortFiles()
{
  return maxOpenSortFiles;
}

代码示例来源:origin: prestodb/presto

@Min(0)
@Max(1_000_000_000)
public int getMaxQueryLength()
{
  return maxQueryLength;
}

代码示例来源:origin: javaee-samples/javaee7-samples

@POST
  @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
  public void post2(@NotNull @FormParam("name") String name, @Min(1) @Max(10) @FormParam("age") int age) {
  }
}

代码示例来源:origin: dropwizard/dropwizard

@Min(1)
@Max(16 * 1024)
private int minThreads = 1;
@Min(1)
@Max(16 * 1024)
private int maxThreads = 128;
@Min(1)
@Max(16 * 1024)
private int workQueueSize = 8;

代码示例来源:origin: dropwizard/dropwizard

public class Http2CConnectorFactory extends HttpConnectorFactory {
  @Min(100)
  @Max(Integer.MAX_VALUE)
  private int maxConcurrentStreams = 1024;
  @Min(1)
  @Max(Integer.MAX_VALUE)
  private int initialStreamRecvWindow = 65535;

代码示例来源:origin: prontera/spring-cloud-rest-tcc

/**
 * @author Zhao Junjian
 */
@Getter
@Setter
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler", "fieldHandler"}, ignoreUnknown = true)
public class IncreaseProductInventoryRequest extends RestfulRequest {
  private static final long serialVersionUID = -9199433097889171784L;

  @NotNull
  @Min(0)
  @Max(100000000)
  @ApiModelProperty(value = "库存", required = true, example = "10000000")
  private Integer count;

}

代码示例来源:origin: apache/incubator-druid

@Min(1)
private int segmentsPerNode = 50;
@Max(1024 * 1024)
@Min(1024)
private long maxBytesPerNode = 512 * 1024;

代码示例来源:origin: apache/incubator-druid

@Min(0)
@Max(0xffff)
private int restPort = 8080;
@Min(0)
private int pollingMs = 10000;

代码示例来源:origin: dropwizard/dropwizard

private static final String HTTP2_DEFAULT_CIPHER = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256";
@Min(100)
@Max(Integer.MAX_VALUE)
private int maxConcurrentStreams = 1024;
@Min(1)
@Max(Integer.MAX_VALUE)
private int initialStreamRecvWindow = 65535;

代码示例来源:origin: hibernate/hibernate-orm

@Min(100)
@Max(250)
public BigDecimal getPower() {
  return power;
}

代码示例来源:origin: prontera/spring-cloud-rest-tcc

/**
 * @author Zhao Junjian
 */
@Getter
@Setter
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler", "fieldHandler"}, ignoreUnknown = true)
public class RechargeRequest extends RestfulRequest {

  private static final long serialVersionUID = 7648874951562688753L;

  @NotNull
  @Min(1)
  @Max(100000000)
  @ApiModelProperty(value = "充值金额, 单位分", example = "100000000", required = true)
  private Long amount;

}

代码示例来源:origin: prontera/spring-cloud-rest-tcc

/**
 * @author Zhao Junjian
 */
@Getter
@Setter
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler", "fieldHandler"}, ignoreUnknown = true)
public class BalanceReservationRequest extends RestfulRequest {

  private static final long serialVersionUID = -7315046960598963993L;

  @NotNull
  @Min(1)
  @ApiModelProperty(value = "用户ID", example = "1", required = true)
  private Long userId;

  @NotNull
  @Min(1)
  @Max(100000000L)
  @ApiModelProperty(value = "预留金额", example = "100", required = true)
  private Long amount;

}

代码示例来源:origin: prontera/spring-cloud-rest-tcc

/**
 * @author Zhao Junjian
 */
@Getter
@Setter
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler", "fieldHandler"}, ignoreUnknown = true)
public class BalanceReservationRequest extends RestfulRequest {

  private static final long serialVersionUID = -7315046960598963993L;

  @NotNull
  @Min(1)
  @ApiModelProperty(value = "用户ID", example = "1", required = true)
  private Long userId;

  @NotNull
  @Min(1)
  @Max(100000000L)
  @ApiModelProperty(value = "预留金额", example = "100", required = true)
  private Long amount;

}

代码示例来源:origin: apache/incubator-druid

@Min(1024)
@Max(65535)
private int startPort = 8100;
@Min(1024)
@Max(65535)
private int endPort = 65535;

代码示例来源:origin: prontera/spring-cloud-rest-tcc

@Min(100L)
@Max(100000000L)
@JsonProperty("balance")
@ApiModelProperty(value = "用户的初始化余额", example = "100000000", required = true)

代码示例来源:origin: embulk/embulk

@Config("level")
@ConfigDefault("9")
@Min(1)
@Max(9)
int getLevel();

代码示例来源:origin: embulk/embulk

@Config("level")
@ConfigDefault("6")
@Min(0)
@Max(9)
int getLevel();

代码示例来源:origin: dropwizard/dropwizard

private String host = "localhost";
@Min(1)
@Max(65535)
private int port = SyslogConstants.SYSLOG_PORT;

代码示例来源:origin: dropwizard/dropwizard

@Min(1)
@Max(Integer.MAX_VALUE)
private int maxConnections = 1024;
@Min(1)
@Max(Integer.MAX_VALUE)
private int maxConnectionsPerRoute = 1024;
private Duration keepAlive = Duration.milliseconds(0);
@Min(0)
@Max(1000)
private int retries = 0;

代码示例来源:origin: apache/incubator-druid

@Min(10 * 1024)
private int maxZnodeBytes = CuratorUtils.DEFAULT_MAX_ZNODE_BYTES;
@Min(1)
private int pendingTasksRunnerNumThreads = 1;
@Min(1)
private int maxRetriesBeforeBlacklist = 5;
@Max(100)
@Min(0)
private int maxPercentageBlacklistWorkers = 20;

相关文章