spring-graphql ProjectStatus 源码

  • 2022-08-16
  • 浏览 (559)

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 源码目录

相关文章

spring-graphql Project 源码

spring-graphql ProjectController 源码

spring-graphql Release 源码

spring-graphql ReleaseStatus 源码

spring-graphql SpringProjectsClient 源码

spring-graphql package-info 源码

0  赞