public static String getSourceIp() {
        AddressContext addressContext = RequestContextHolder.getContext().getBasicContext().getAddressContext();
        String sourceIp = addressContext.getSourceIp();
        if (StringUtils.isBlank(sourceIp)) {
            sourceIp = addressContext.getRemoteIp();
        }
        return sourceIp;
    }
@Test
    void testGetSourceIp() {
        assertEquals("2.2.2.2", NamingRequestUtil.getSourceIp());
        RequestContextHolder.getContext().getBasicContext().getAddressContext().setSourceIp(null);
        assertEquals("1.1.1.1", NamingRequestUtil.getSourceIp());
        RequestContextHolder.getContext().getBasicContext().getAddressContext().setRemoteIp(null);
        assertNull(NamingRequestUtil.getSourceIp());
    }