package com.propertyManagement.web.controller.system;

import cn.dev33.satoken.annotation.SaIgnore;
import com.propertyManagement.common.config.PropertyManagementConfig;
import com.propertyManagement.common.utils.StringUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 首页
 *
 * @author Lion Li
 */
@RequiredArgsConstructor
@RestController
public class SysIndexController {

    /**
     * 系统基础配置
     */
    private final PropertyManagementConfig propertymanagementConfig;

    /**
     * 访问首页，提示语
     */
    @SaIgnore
    @GetMapping("/")
    public String index() {
        return StringUtils.format("当前版本：v{}", propertymanagementConfig.getVersion());
    }
}
