example of a spring boot controller
- User
example of a spring boot controller
Assistant
Here's an example of a simple Spring Boot controller:
@RestController public class HelloController { @GetMapping("/hello") public String sayHello() { return "Hello!"; } @GetMapping("/hello/{name}") public String sayHello(@PathVariable String name) { return "Hello " + name + "!"; } @PostMapping("/hello") public String sayHello(@RequestBody HelloRequest request) { return "Hello " + request.getName() + "!"; } static class HelloRequest { private String name; public String getName() { return name; } public void setName(String name) { this.name = name; } } }
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.