|
@@ -1,16 +1,26 @@
|
|
|
package es.uv.saic.web;
|
|
package es.uv.saic.web;
|
|
|
|
|
|
|
|
|
|
+import es.uv.saic.service.EnhancementService;
|
|
|
|
|
+import lombok.RequiredArgsConstructor;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
@RestController
|
|
@RestController
|
|
|
@RequestMapping("/enhancements")
|
|
@RequestMapping("/enhancements")
|
|
|
|
|
+@RequiredArgsConstructor
|
|
|
public class EnhancementController {
|
|
public class EnhancementController {
|
|
|
|
|
|
|
|
|
|
+ private final EnhancementService enhancementService;
|
|
|
|
|
+
|
|
|
@GetMapping("hello")
|
|
@GetMapping("hello")
|
|
|
public String helloWord() {
|
|
public String helloWord() {
|
|
|
return "Hello World";
|
|
return "Hello World";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @GetMapping("chat")
|
|
|
|
|
+ public String chat(@RequestParam String message) {
|
|
|
|
|
+ return enhancementService.ask(message);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|