You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
package com.project.milvus.controller;
|
|
|
|
|
|
|
|
|
|
import com.project.base.domain.result.Result;
|
|
|
|
|
import com.project.milvus.application.MilvusApplicationService;
|
|
|
|
|
import com.project.milvus.domain.dto.TitleVector;
|
|
|
|
|
import com.project.milvus.domain.service.MilvusDemoService;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RestController
|
|
|
|
|
@RequestMapping("/milvus")
|
|
|
|
|
public class MilvusController {
|
|
|
|
|
@Autowired
|
|
|
|
|
private MilvusApplicationService milvusApplicationService;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 题目入向量数据库
|
|
|
|
|
*/
|
|
|
|
|
@PostMapping("/insert")
|
|
|
|
|
public Result insert(@RequestBody TitleVector title) {
|
|
|
|
|
milvusApplicationService.insertTitle(title);
|
|
|
|
|
return Result.success(null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|