初始化rasa模块
parent
aba7616307
commit
11fd10e4be
@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>com.supervision</groupId>
|
||||
<artifactId>virtual-patient</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.superversion</groupId>
|
||||
<artifactId>virtual-patient-rasa</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>virtual-patient-rasa</name>
|
||||
<description>virtual-patient-rasa</description>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>1.5.22</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@ -0,0 +1,13 @@
|
||||
package com.superversion.rasa;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class VirtualPatientRasaApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(VirtualPatientRasaApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package com.superversion.rasa.controller;
|
||||
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.UUID;
|
||||
|
||||
@Api(tags = "辅助检查")
|
||||
@RestController
|
||||
@RequestMapping("askAncillary")
|
||||
@RequiredArgsConstructor
|
||||
public class AskAncillaryController {
|
||||
|
||||
|
||||
@ApiOperation("接收页面的语音消息(暂时不用这个接口,主要使用websocket进行通信)")
|
||||
@PostMapping("/receiveVoiceFile")
|
||||
public String receiveVoiceFile(@RequestParam("file") MultipartFile file) throws IOException {
|
||||
//return askService.receiveVoiceFile(file);
|
||||
|
||||
if (file != null && !file.isEmpty()) {
|
||||
String fileName1 = file.getOriginalFilename(); //获取保存文件名
|
||||
String suffixName=fileName1.substring(fileName1.lastIndexOf(".")); //文件格式
|
||||
String fileName= UUID.randomUUID()+suffixName;//重命名a.jpg
|
||||
//保存文件到对应位置
|
||||
File dir = new File("F:\\tmp\\"+fileName);
|
||||
if (!dir.getParentFile().exists()) {
|
||||
dir.getParentFile().mkdirs();
|
||||
}
|
||||
try {
|
||||
file.transferTo(dir);
|
||||
} catch (IOException e) {
|
||||
//抛出异常
|
||||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
|
@ -0,0 +1,13 @@
|
||||
package com.superversion.rasa;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@SpringBootTest
|
||||
class VirtualPatientRasaApplicationTests {
|
||||
|
||||
@Test
|
||||
void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue