删除了无用示例
This commit is contained in:
parent
fd0cb2d345
commit
6beeb110c2
@ -1,23 +0,0 @@
|
||||
package org.cmh.backend.authentication.controller;
|
||||
|
||||
import org.cmh.backend.authentication.model.User;
|
||||
import org.cmh.backend.authentication.service.UserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/users")
|
||||
public class UserController {
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
@GetMapping("/{username}")
|
||||
public ResponseEntity<User> getUser(@PathVariable String username) {
|
||||
User user = userService.getUserByUsername(username);
|
||||
return ResponseEntity.ok(user);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user