Files.probeContentType的替代
<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-core</artifactId>
<version>1.12</version>
</dependency>
ika tika = new Tika(); File file = ... String mimeType = tika.detect(file);
<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-core</artifactId>
<version>1.12</version>
</dependency>
ika tika = new Tika(); File file = ... String mimeType = tika.detect(file);