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