perf:调整依赖
This commit is contained in:
@@ -23,12 +23,6 @@
|
||||
<groupId>com.tiesheng</groupId>
|
||||
<artifactId>tiesheng-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>easyexcel</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<repositories>
|
||||
|
||||
@@ -1,21 +1,14 @@
|
||||
package com.tiesheng.demo.controller;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.tiesheng.annotation.token.TokenIgnore;
|
||||
import com.tiesheng.demo.pojos.TestFile;
|
||||
import com.tiesheng.message.config.aliyun.AliyunSmsConfig;
|
||||
import com.tiesheng.message.pojos.MessageReqResp;
|
||||
import com.tiesheng.poi.util.PoiWriteUtil;
|
||||
import com.tiesheng.util.config.GlobalConfig;
|
||||
import com.tiesheng.util.pojos.ApiResp;
|
||||
import com.tiesheng.util.pojos.FileUploadPath;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author hao
|
||||
@@ -26,8 +19,8 @@ public class TestController {
|
||||
|
||||
@Autowired
|
||||
GlobalConfig globalConfig;
|
||||
@Autowired
|
||||
AliyunSmsConfig aliyunSmsConfig;
|
||||
// @Autowired
|
||||
// AliyunSmsConfig aliyunSmsConfig;
|
||||
|
||||
@RequestMapping("/index")
|
||||
@TokenIgnore
|
||||
@@ -45,9 +38,9 @@ public class TestController {
|
||||
@RequestMapping("/send")
|
||||
@TokenIgnore
|
||||
public ApiResp<MessageReqResp> sendMessage() {
|
||||
MessageReqResp reqResp = aliyunSmsConfig.sendSms("13567116463", "SMS_126361543",
|
||||
JSONUtil.createObj().putOpt("code", "123456"));
|
||||
return ApiResp.respOK(reqResp);
|
||||
// MessageReqResp reqResp = aliyunSmsConfig.sendSms("13567116463", "SMS_126361543",
|
||||
// JSONUtil.createObj().putOpt("code", "123456"));
|
||||
return ApiResp.respOK(new MessageReqResp());
|
||||
}
|
||||
|
||||
|
||||
@@ -55,14 +48,14 @@ public class TestController {
|
||||
@TokenIgnore
|
||||
public ApiResp<String> export() {
|
||||
|
||||
List<TestFile> list = new ArrayList<>();
|
||||
list.add(new TestFile("11111"));
|
||||
list.add(new TestFile("22222"));
|
||||
list.add(new TestFile("33333"));
|
||||
list.add(new TestFile("44444"));
|
||||
|
||||
FileUploadPath fileUploadPath = FileUploadPath.random("xlsx");
|
||||
PoiWriteUtil.export(list, TestFile.class, fileUploadPath.getAbsolutePath(), "hahah");
|
||||
// List<TestFile> list = new ArrayList<>();
|
||||
// list.add(new TestFile("11111"));
|
||||
// list.add(new TestFile("22222"));
|
||||
// list.add(new TestFile("33333"));
|
||||
// list.add(new TestFile("44444"));
|
||||
//
|
||||
// FileUploadPath fileUploadPath = FileUploadPath.random("xlsx");
|
||||
// PoiWriteUtil.export(list, TestFile.class, fileUploadPath.getAbsolutePath(), "hahah");
|
||||
|
||||
return ApiResp.respOK("");
|
||||
}
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
package com.tiesheng.demo.pojos;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.tiesheng.poi.pojos.PoiWriteBase;
|
||||
|
||||
public class TestFile implements PoiWriteBase {
|
||||
|
||||
|
||||
@ExcelProperty("测试")
|
||||
private String test;
|
||||
|
||||
public TestFile(String test) {
|
||||
this.test = test;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// setter、getter
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
public String getTest() {
|
||||
return test;
|
||||
}
|
||||
|
||||
public void setTest(String test) {
|
||||
this.test = test;
|
||||
}
|
||||
}
|
||||
//package com.tiesheng.demo.pojos;
|
||||
//
|
||||
//import com.alibaba.excel.annotation.ExcelProperty;
|
||||
//import com.tiesheng.poi.pojos.PoiWriteBase;
|
||||
//
|
||||
//public class TestFile implements PoiWriteBase {
|
||||
//
|
||||
//
|
||||
// @ExcelProperty("测试")
|
||||
// private String test;
|
||||
//
|
||||
// public TestFile(String test) {
|
||||
// this.test = test;
|
||||
// }
|
||||
//
|
||||
// ///////////////////////////////////////////////////////////////////////////
|
||||
// // setter、getter
|
||||
// ///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// public String getTest() {
|
||||
// return test;
|
||||
// }
|
||||
//
|
||||
// public void setTest(String test) {
|
||||
// this.test = test;
|
||||
// }
|
||||
//}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<scope>compile</scope>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<scope>compile</scope>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-aop</artifactId>
|
||||
<scope>compile</scope>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -28,12 +28,12 @@
|
||||
<dependency>
|
||||
<groupId>com.aliyun</groupId>
|
||||
<artifactId>tea-openapi</artifactId>
|
||||
<scope>compile</scope>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.aliyun</groupId>
|
||||
<artifactId>dysmsapi20170525</artifactId>
|
||||
<scope>compile</scope>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.aliyun.teaopenapi.models.Config;
|
||||
import com.tiesheng.message.pojos.MessageReqResp;
|
||||
import com.tiesheng.message.service.TieshengMessageConfigurer;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@@ -19,6 +20,7 @@ import java.util.Objects;
|
||||
*/
|
||||
@Configuration
|
||||
@ConfigurationProperties(prefix = "tiesheng.aliyun")
|
||||
@ConditionalOnClass(SendSmsResponse.class)
|
||||
public class AliyunSmsConfig {
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>easyexcel</artifactId>
|
||||
<scope>compile</scope>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -30,6 +30,10 @@
|
||||
<artifactId>spring-boot-starter-json</artifactId>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.ehcache</groupId>
|
||||
<artifactId>ehcache</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user