/**
 * Copyright
 * All right reserved.
 * 项目名称:
 * 创建日期:2022-03-04
 */
package org.springblade.modules.demo.controller;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springblade.common.constant.CommonConstant;
import org.springblade.core.tool.api.R;
import org.springblade.props.GalaxyProperties;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/***
 * Date:2022-03-04
 * Title:参数配置
 * Description：对本文件的详细描述，原则上不能少于30字
 * @author Blade
 * @mender：（文件的修改者，文件创建者之外的人）
 * @version 1.0
 * Remark：认为有必要的其他信息
 */
@RestController
@AllArgsConstructor
@RequestMapping(CommonConstant.APPLICATION_NAME + "/demo/config")
@Api(value = "多数据源接口", tags = "多数据源")
public class ConfigController {

	private GalaxyProperties galaxyProperties;

	/**
	 * 1、获取配置项
	 * http://localhost:8000/galaxy-server/demo/config/getConfig
	 *
	 * 2、
	 *
	 *
	 */


	/**
	 * Function:获取配置项
	 * Author: admin
	 * Date:2022/3/4
	  * @param
	 * @return org.springblade.core.tool.api.R<java.lang.String>
	 * @throws Exception
	 */
	@GetMapping("/getConfig")
	@ApiOperationSupport(order = 1)
	@ApiOperation(value = "获取配置项", notes = "获取配置项")
	public R<String> getConfig() {

		return R.data(galaxyProperties.getName());
	}


}
