mirror of
https://gitee.com/bookshelfplus/bookshelfplus
synced 2025-10-11 02:05:15 +08:00
管理员上传文件到存储桶功能基本完成;可以前端计算文件SHA1;添加腾讯云生成SecretId、SecretKey文档
This commit is contained in:
23
bookshelfplus/src/main/java/plus/bookshelf/AppListener.java
Normal file
23
bookshelfplus/src/main/java/plus/bookshelf/AppListener.java
Normal file
@@ -0,0 +1,23 @@
|
||||
package plus.bookshelf;
|
||||
|
||||
import org.springframework.beans.factory.DisposableBean;
|
||||
import org.springframework.boot.CommandLineRunner;
|
||||
import org.springframework.stereotype.Component;
|
||||
import plus.bookshelf.Common.FileManager.QCloudCosUtils;
|
||||
|
||||
@Component
|
||||
public class AppListener implements CommandLineRunner, DisposableBean {
|
||||
//应用启动成功后的回调
|
||||
@Override
|
||||
public void run(String... args) throws Exception {
|
||||
System.out.println("prepare to start ...");
|
||||
}
|
||||
|
||||
//应用启动关闭前的回调
|
||||
@Override
|
||||
public void destroy() throws Exception {
|
||||
System.out.println("prepare to close ...");
|
||||
QCloudCosUtils.destoryInstance();
|
||||
System.out.println("close success ...");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user