Class StudentAppUserController

java.lang.Object
com.markvarga21.studentmanager.controller.StudentAppUserController

@RestController @RequestMapping("/api/v1/studentUser") @CrossOrigin public class StudentAppUserController extends Object
The controller for the student application user.
  • Constructor Details

    • StudentAppUserController

      public StudentAppUserController()
  • Method Details

    • getStudentIdByUsername

      @PreAuthorize("hasRole(\'ROLE_USER\')") @GetMapping("/{username}") public org.springframework.http.ResponseEntity<Long> getStudentIdByUsername(@PathVariable String username)
      This method is used to get the student ID by the username.
      Parameters:
      username - The username of the student.
      Returns:
      The found student ID.