spring-graphql ReleaseStatus 源码

2022-08-16 浏览 (736)

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

相关文章

spring-graphql Project 源码

spring-graphql ProjectController 源码

spring-graphql ProjectStatus 源码

spring-graphql Release 源码

spring-graphql SpringProjectsClient 源码

spring-graphql package-info 源码

  • 所属分类: 后端技术
  • 本文标签: Spring Java
  • 版权声明: 本文链接 https://seaxiang.com/blog/4343055583ad4533a26b766ba9a11100