package com.llisoft.service.file; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; import com.llisoft.common.util.JsonUtil; import com.llisoft.service.file.service.OssService; @SpringBootTest @RunWith(SpringRunner.class) public class ServiceTest { @Autowired private OssService ossService; @Test public void test() throws Exception{ long begin = System.currentTimeMillis(); System.out.println(JsonUtil.toJson(ossService.upload("", ""))); System.out.println("耗时:"+ (System.currentTimeMillis() - begin)); } }