🔄Update: 删除加密逻辑
This commit is contained in:
@@ -40,6 +40,12 @@
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package cn.hezhaohui.backend.controller;
|
||||
|
||||
import cn.hezhaohui.backend.entity.ChatRequest;
|
||||
import cn.hezhaohui.backend.service.ChatService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@CrossOrigin(origins = "*")
|
||||
@RestController
|
||||
@RequestMapping
|
||||
public class ChatController {
|
||||
|
||||
@Autowired
|
||||
private ChatService chatService;
|
||||
|
||||
@PostMapping("/api/chat")
|
||||
public String chat(@RequestBody ChatRequest request) {
|
||||
return chatService.chat(request);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package cn.hezhaohui.backend.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ChatRequest {
|
||||
private String platformId;
|
||||
private String apiKey;
|
||||
private String endpoint;
|
||||
private String message;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package cn.hezhaohui.backend.service;
|
||||
|
||||
import cn.hezhaohui.backend.entity.ChatRequest;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class ChatService {
|
||||
|
||||
public String chat(ChatRequest request) {
|
||||
System.out.println(request);
|
||||
return " ";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user