| | |
| | | @Autowired |
| | | private OssServiceContext ossServiceContext; |
| | | |
| | | @Autowired |
| | | private OssConfiguration configuration; |
| | | |
| | | @Before("execution(public * com.dji.sample.component.oss.service.impl.OssServiceContext.*(..))") |
| | | public void before() { |
| | | if (!this.configuration.isEnable()) { |
| | | throw new IllegalArgumentException("Please enable OssConfiguration."); |
| | | if (!OssConfiguration.enable) { |
| | | throw new IllegalArgumentException("请启用OssConfiguration"); |
| | | } |
| | | if (this.ossServiceContext.getOssService() == null) { |
| | | throw new IllegalArgumentException("Please check the OssConfiguration configuration."); |
| | | throw new IllegalArgumentException("请检查OssConfiguration配置"); |
| | | } |
| | | this.ossServiceContext.createClient(); |
| | | } |
| | | } |