test health check

This commit is contained in:
heyethereum
2024-06-30 13:08:26 +08:00
parent 268748a07d
commit 1afbcbe410

View File

@@ -8,15 +8,17 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;
@RestController
@RequestMapping("/v1")
public class UserController {
@Autowired
UserService userService;
@GetMapping(value = "/version", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<String> version() {
System.out.println(userService.getUserByEmail());
return ResponseEntity.ok("SafeQR v1.0.2");
public ResponseEntity<Map<String, String>> version() {
//System.out.println(userService.getUserByEmail());
return ResponseEntity.ok(Map.of("version","SafeQR v1.0.2"));
}
}