22301102 | 8fd30b8 | 2025-06-05 18:02:21 +0800 | [diff] [blame] | 1 | package com.pt.testResponse; |
| 2 | |
| 3 | import org.springframework.web.bind.annotation.CrossOrigin; |
| 4 | import org.springframework.web.bind.annotation.GetMapping; |
| 5 | import org.springframework.web.bind.annotation.RestController; |
| 6 | |
| 7 | @RestController |
| 8 | @CrossOrigin(origins = "*") |
| 9 | public class TestController { |
| 10 | |
22301102 | 78a3416 | 2025-06-05 18:02:21 +0800 | [diff] [blame^] | 11 | @GetMapping("/api/test") |
22301102 | 8fd30b8 | 2025-06-05 18:02:21 +0800 | [diff] [blame] | 12 | public String testResponse() { |
| 13 | return "Hello, world!"; |
| 14 | } |
| 15 | } |