POM
<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>
Java
@Test
public void test() throws IOException {
String url = "http://127.0.0.1:8000";
IOUtils.toByteArray(URI.create(url));
}
安全风险
- 注意SSRF漏洞风险;