mirror of
https://gitee.com/bookshelfplus/bookshelfplus
synced 2025-09-21 01:10:39 +08:00
管理员上传文件到存储桶功能基本完成;可以前端计算文件SHA1;添加腾讯云生成SecretId、SecretKey文档
This commit is contained in:
@@ -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.";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user