1
0
mirror of https://gitee.com/bookshelfplus/bookshelfplus synced 2025-09-21 01:10:39 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

管理员上传文件到存储桶功能基本完成;可以前端计算文件SHA1;添加腾讯云生成SecretId、SecretKey文档

This commit is contained in:
2022-04-08 17:53:32 +08:00
parent d40189c1ca
commit 357a1bd42e
21 changed files with 1014 additions and 49 deletions

View File

@@ -1,18 +1,11 @@
package plus.bookshelf;
import com.qcloud.cos.http.HttpMethodName;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import plus.bookshelf.Common.FileManager.QCloudCosUtils;
import plus.bookshelf.Config.QCloudCosConfig;
/**
* Hello world!
*/
@SpringBootApplication(scanBasePackages = {"plus.bookshelf"})
@RestController
@MapperScan("plus.bookshelf.Dao.Mapper")
@@ -24,19 +17,12 @@ public class App {
// 启动SpringBoot项目
SpringApplication.run(App.class, args);
System.out.println("backend service started successfully.");
}
@RequestMapping("/")
public String Home() {
return "首页";
}
@Autowired
QCloudCosConfig qCloudCosConfig;
@RequestMapping("/cos")
public String cos() {
QCloudCosUtils QCloudCosUtils = new QCloudCosUtils(qCloudCosConfig);
return QCloudCosUtils.getUrl("user-login-token", HttpMethodName.POST, "mydemo.jpg", 5);
return "backend service is running.";
}
}