123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- package com.caimei;
- import com.github.tobato.fastdfs.FdfsClientConfig;
- import org.springframework.beans.factory.annotation.Value;
- import org.springframework.boot.SpringApplication;
- import org.springframework.boot.autoconfigure.SpringBootApplication;
- import org.springframework.boot.web.servlet.MultipartConfigFactory;
- import org.springframework.boot.web.servlet.ServletComponentScan;
- import org.springframework.context.annotation.Bean;
- import org.springframework.context.annotation.EnableMBeanExport;
- import org.springframework.context.annotation.Import;
- import org.springframework.jmx.support.RegistrationPolicy;
- import org.springframework.scheduling.annotation.EnableAsync;
- import org.springframework.scheduling.annotation.EnableScheduling;
- import javax.servlet.MultipartConfigElement;
- /**
- * Description
- *
- * @author : Aslee
- * @date : 2021/5/11
- */
- @Import(FdfsClientConfig.class)
- // 解决jmx重复注册bean的问题
- @EnableMBeanExport(registration = RegistrationPolicy.IGNORE_EXISTING)
- @ServletComponentScan
- @SpringBootApplication
- public class AdminApplication {
- @Value("${spring.profiles.active}")
- private String active;
- public static void main(String[] args) {
- SpringApplication.run(AdminApplication.class, args);
- }
- /**
- * 文件上传临时路径
- */
- @Bean
- MultipartConfigElement multipartConfigElement() {
- MultipartConfigFactory factory = new MultipartConfigFactory();
- factory.setLocation("/mnt/newdatadrive/data/runtime/jar-instance/zplma/tempImage");
- return factory.createMultipartConfig();
- }
- }
|