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