Commit 9f1fe97d authored by huangcb's avatar huangcb

alibaba druid版本由1.1.21升级到1.1.22

parent 89590c6c
......@@ -22,7 +22,7 @@
<alibaba-nacos-discovery.version>2.1.1.RELEASE</alibaba-nacos-discovery.version>
<alibaba-nacos-config.version>2.1.1.RELEASE</alibaba-nacos-config.version>
<alibaba-fastjson.version>1.2.62</alibaba-fastjson.version>
<alibaba-druid.version>1.1.21</alibaba-druid.version>
<alibaba-druid.version>1.1.22</alibaba-druid.version>
<apache-commons-lang3.version>3.7</apache-commons-lang3.version>
<mybatisplus.version>3.3.1</mybatisplus.version>
</properties>
......@@ -110,6 +110,12 @@
<groupId>com.baidu.aip</groupId>
<artifactId>java-sdk</artifactId>
<version>4.12.0</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
......
......@@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.RestController;
@Slf4j
public class TestController {
@GetMapping("/ping")
@RequestMapping("/ping")
public EResponse ping() {
return EResponse.ok();
}
......
......@@ -3,14 +3,14 @@ server:
servlet:
context-path: /file
nacos:
url: localhost:8848
namespace: 548b506d-8d19-4d54-9715-bb0ac3a655b2
group: FREIGHT_GROUP
url: 192.168.31.248:8848
namespace: aad5aa26-5351-4e7a-a65e-ecb332f3c52c
group: DEFAULT_GROUP
spring:
application:
name: freight-file-service
profiles:
active: dev
active: test
cloud:
nacos:
discovery:
......
......@@ -48,12 +48,12 @@ public class UploadControllerTest extends BaseTestController {
JSONObject reqJson = new JSONObject();
// 构造数据
String filepath = "D:\\test\\1366x768_107480_8.jpg";
String filepath = "D:\\test\\苏州英思唯智能科技有限公司沈阳分公司.png";
File file = new File(filepath);
InputStream input = new FileInputStream(file);
reqJson.put("fileType", "image");
reqJson.put("fileData", Base64.getEncoder().encodeToString(IOUtils.toByteArray(input)));
reqJson.put("fileName", "1366x768_107480_8.jpg");
reqJson.put("fileName", "苏州英思唯智能科技有限公司沈阳分公司-公章");
MvcResult mvcResult = this.getMockMvc().perform(MockMvcRequestBuilders.post(url)
.contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)
......@@ -111,7 +111,7 @@ public class UploadControllerTest extends BaseTestController {
InputStream input = new FileInputStream(file);
reqJson.put("fileType", "word");
reqJson.put("fileData", Base64.getEncoder().encodeToString(IOUtils.toByteArray(input)));
reqJson.put("fileName", "线合同-货主");
reqJson.put("fileName", "线合同-货主");
MvcResult mvcResult = this.getMockMvc().perform(MockMvcRequestBuilders.post(url)
.contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment