|
|
|
@ -1,20 +1,22 @@
|
|
|
|
|
package com.ruoyi;
|
|
|
|
|
|
|
|
|
|
import com.ruoyi.system.util.IFileUtil;
|
|
|
|
|
import com.ruoyi.system.util.LocalFileUtil;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.boot.SpringApplication;
|
|
|
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
|
|
|
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
|
|
|
|
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
|
|
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 启动程序
|
|
|
|
|
*
|
|
|
|
|
* @author ruoyi
|
|
|
|
|
*/
|
|
|
|
|
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
|
|
|
|
|
public class RuoYiApplication
|
|
|
|
|
{
|
|
|
|
|
public static void main(String[] args)
|
|
|
|
|
{
|
|
|
|
|
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
|
|
|
|
|
public class RuoYiApplication {
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
|
// System.setProperty("spring.devtools.restart.enabled", "false");
|
|
|
|
|
SpringApplication.run(RuoYiApplication.class, args);
|
|
|
|
|
System.out.println("(♥◠‿◠)ノ゙ 若依启动成功 ლ(´ڡ`ლ)゙ \n" +
|
|
|
|
@ -28,4 +30,18 @@ public class RuoYiApplication
|
|
|
|
|
" | | \\ / \\ / \n" +
|
|
|
|
|
" ''-' `'-' `-..-' ");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Value("${file.type}")
|
|
|
|
|
private String fileType;
|
|
|
|
|
@Value("${file.path}")
|
|
|
|
|
private String filePath;
|
|
|
|
|
|
|
|
|
|
@Bean
|
|
|
|
|
public IFileUtil getFileUtil() {
|
|
|
|
|
if (fileType.equals("local")) {
|
|
|
|
|
return new LocalFileUtil(filePath);
|
|
|
|
|
} else {
|
|
|
|
|
throw new IllegalArgumentException("未知文件工具类注入类型");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|