ISysFileService.java 562 B

1234567891011121314151617181920
  1. package com.railway.system.service;
  2. import org.springframework.web.multipart.MultipartFile;
  3. /**
  4. * 文件上传接口
  5. * 实现类上加注解@Primary:自动装配时,被注解为@Primary的Bean将作为首选者,否则将抛出异常。(只对接口的多个实现生效)
  6. * @author railway
  7. */
  8. public interface ISysFileService
  9. {
  10. /**
  11. * 文件上传接口
  12. *
  13. * @param file 上传的文件
  14. * @return 访问地址
  15. * @throws Exception 文件上传异常
  16. */
  17. String uploadFile(MultipartFile file) throws Exception;
  18. }