spring-graphql ReleaseStatus 源码

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

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

0  赞