SysIndexController.java 772 B

123456789101112131415161718192021222324252627282930
  1. package com.ruoyi.web.controller.system;
  2. import com.ruoyi.common.config.RuoYiConfig;
  3. import com.ruoyi.common.utils.StringUtils;
  4. import lombok.RequiredArgsConstructor;
  5. import org.springframework.web.bind.annotation.GetMapping;
  6. import org.springframework.web.bind.annotation.RestController;
  7. /**
  8. * 首页
  9. *
  10. * @author Lion Li
  11. */
  12. @RequiredArgsConstructor
  13. @RestController
  14. public class SysIndexController {
  15. /**
  16. * 系统基础配置
  17. */
  18. private final RuoYiConfig ruoyiConfig;
  19. /**
  20. * 访问首页,提示语
  21. */
  22. @GetMapping("/")
  23. public String index() {
  24. return StringUtils.format("欢迎使用{}后台管理框架,当前版本:v{},请通过前端地址访问。", ruoyiConfig.getName(), ruoyiConfig.getVersion());
  25. }
  26. }