青羊经侦大队-数据平台
11
baizonghao
2023-05-25 7ea5eece501c98a91555a5358931367e78e9d23b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package com.example.jz.dao;
 
import com.example.jz.exception.BusinessException;
import com.example.jz.modle.vo.GroupUserVo;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
 
import java.util.List;
 
import static org.junit.jupiter.api.Assertions.*;
 
/**
 * @author 安瑾然
 * @data 2022/7/14 - 1:49 PM
 * @description
 */
@SpringBootTest
class GroupDaoTest {
    private GroupDao groupDao;
 
    @Autowired
    public void setGroupDao(GroupDao groupDao) {
        this.groupDao = groupDao;
    }
 
    @Test
    void getAllUser() {
        String str ="http://42.193.1.25:9000/img/2022/12/27/851da62efac5431c8c313a757a14e327.jpeg" +
                "?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=satori%2F20221227%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date" +
                "=20221227T034709Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=" +
                "c584eaa85b7f22420541e53f6e36d681bbc4aeb0ef07272538689dea7ee112b4";
        int imgIndexFirst = str.indexOf("/img");
        int imgIndexEnd= str.indexOf("?");
        System.out.println(str.substring(imgIndexFirst+5,imgIndexEnd));
    }
}