首页>代码>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();
		};
	}
}
最近下载更多
xiaokang1  LV10 昨天
ssh123  LV10 前天
Qolmen  LV12 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日
sin777  LV2 2022年8月14日
最近浏览更多
xiaokang1  LV10 昨天
ssh123  LV10 前天
13521878735  LV3 3月27日
zhaixunfei  LV8 2月8日
Qolmen  LV12 1月3日
夜起星河  LV8 2023年12月26日
cc7777 2023年12月25日
暂无贡献等级
哪里的完整版  LV7 2023年12月15日
fff2003  LV6 2023年12月13日
漫步的海星  LV4 2023年9月21日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友