spring-graphql ReleaseStatus 源码
spring-graphql ReleaseStatus 代码
文件路径:/samples/webmvc-http/src/main/java/io/spring/sample/graphql/project/ReleaseStatus.java
package io.spring.sample.graphql.project;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonCreator;
public enum ReleaseStatus {
GENERAL_AVAILABILITY, MILESTONE, SNAPSHOT;
@JsonCreator
public static ReleaseStatus fromName(String name) {
return Arrays.stream(ReleaseStatus.values())
.filter(type -> type.name().equals(name))
.findFirst()
.orElse(ReleaseStatus.GENERAL_AVAILABILITY);
}
}
相关信息
相关文章
spring-graphql ProjectController 源码
spring-graphql ProjectStatus 源码
0
赞
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦