Commit 9f1fe97d authored by huangcb's avatar huangcb

alibaba druid版本由1.1.21升级到1.1.22

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