mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 08:24:13 +00:00
Early support for Jakarta Servlet 6.2 and Jakarta Activation 2.2
Closes gh-35670
This commit is contained in:
+6
@@ -19,6 +19,7 @@ package org.springframework.mail.javamail;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.file.Path;
|
||||
|
||||
import jakarta.activation.FileTypeMap;
|
||||
import jakarta.activation.MimetypesFileTypeMap;
|
||||
@@ -178,4 +179,9 @@ public class ConfigurableMimeFileTypeMap extends FileTypeMap implements Initiali
|
||||
return getFileTypeMap().getContentType(fileName);
|
||||
}
|
||||
|
||||
// @Override - on Activation 2.2
|
||||
public String getContentType(Path path) {
|
||||
return getFileTypeMap().getContentType(path.getFileName().toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user