package com.reyun.saas.web.controller.config;

import com.reyun.saas.common.framework.ApiRestController;
import com.reyun.saas.common.restResult.RestResult;
import com.reyun.saas.common.restResult.ResultGenerator;
import com.reyun.saas.common.config.ApplicationConfig;
import com.reyun.saas.web.aop.Log;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import springfox.documentation.annotations.ApiIgnore;

/**
 * @Auther:
 */
@ApiIgnore
@ApiRestController("/config")
public class ApplicationConfigController {

    @Autowired
    ApplicationConfig applicationConfig;
    /**
     * 返回配置信息
     */
    @Log(description = "获取配置信息", value = 4, type = 1)
    @GetMapping(value = "/info")
    public RestResult info() {
        return ResultGenerator.genSuccessResult(applicationConfig);
    }

}
