SystemInfoController.java

  1. package edu.ucsb.cs156.courses.controllers;

  2. import edu.ucsb.cs156.courses.models.SystemInfo;
  3. import edu.ucsb.cs156.courses.services.SystemInfoService;
  4. import io.swagger.v3.oas.annotations.Operation;
  5. import io.swagger.v3.oas.annotations.tags.Tag;
  6. import org.springframework.beans.factory.annotation.Autowired;
  7. import org.springframework.web.bind.annotation.GetMapping;
  8. import org.springframework.web.bind.annotation.RequestMapping;
  9. import org.springframework.web.bind.annotation.RestController;

  10. @Tag(name = "System Information")
  11. @RequestMapping("/api/systemInfo")
  12. @RestController
  13. public class SystemInfoController extends ApiController {

  14.   @Autowired private SystemInfoService systemInfoService;

  15.   @Operation(summary = "Get global public information about the application")
  16.   @GetMapping("")
  17.   public SystemInfo getSystemInfo() {
  18.     return systemInfoService.getSystemInfo();
  19.   }
  20. }