All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.flood.cloud.gateway.handler.IndexHandler Maven / Gradle / Ivy

There is a newer version: 2.7.14.0
Show newest version
package cn.flood.cloud.gateway.handler;

import cn.flood.enums.EnvType;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;

/**
 * 网关默认首页
 *
 * @author mmdai
 */
@RestController
public class IndexHandler {

	@Value("${spring.profiles.active}")
	private String env;

	@GetMapping("/")
	public Mono index() {
		return Mono.just(desc());
	}

	private String desc() {
		StringBuilder sb = new StringBuilder(100);
		sb.append("
FloodCloud gateway has been started!
"); if (!EnvType.PROD.getCode().equals(env)) { sb.append("
"); sb.append("
"); } return sb.toString(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy