首页>代码>SpringBoot上传文件简单实例>/springboot-upload-file/src/main/java/com/cicoding/SpringbootUploadFileApplication.java
package com.cicoding;

import com.cicoding.storage.StorageProperties;
import com.cicoding.storage.StorageService;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
@EnableConfigurationProperties(StorageProperties.class)
public class SpringbootUploadFileApplication {

	public static void main(String[] args) {
		SpringApplication.run(SpringbootUploadFileApplication.class, args);
	}

	@Bean
	CommandLineRunner init(StorageService storageService) {
		return (args) -> {
			storageService.deleteAll();
			storageService.init();
		};
	}
}
最近下载更多
微信网友_7134912998903808  LV15 2024年9月11日
xiaokang1  LV10 2024年4月25日
ssh123  LV10 2024年4月24日
Qolmen  LV12 2024年1月3日
黄小熙  LV7 2023年10月13日
lcqlcl  LV11 2023年8月29日
ship007  LV10 2023年8月9日
3159792465  LV10 2023年4月29日
regedit418  LV12 2022年9月1日
天险无涯  LV15 2022年8月30日
最近浏览更多
微信网友_6377331253415936  LV3 2024年11月5日
微信网友_7134912998903808  LV15 2024年9月2日
chn-lei  LV2 2024年8月24日
shuangfu  LV25 2024年5月17日
welcome丶  LV8 2024年4月26日
xiaokang1  LV10 2024年4月25日
ssh123  LV10 2024年4月24日
13521878735  LV3 2024年3月27日
zhaixunfei  LV8 2024年2月8日
Qolmen  LV12 2024年1月3日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友