You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.adoc
+53Lines changed: 53 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -203,6 +203,59 @@ Before adopting virtual threads extensively, thoroughly test applications under
203
203
204
204
Excessive advertising of virtual threads might overlook the associated risks. Emphasize a cautious approach, encouraging users to consider the limitations and employ them judiciously.
205
205
206
+
### Adding Custom MimeMappings
207
+
**Step 1: Identify the MimeMappings File**
208
+
209
+
Locate the configuration file responsible for MimeMappings. Typically, it's named web.xml or similar.
210
+
211
+
**Step 2: Edit the MimeMappings**
212
+
213
+
Open the identified configuration file.
214
+
215
+
Look for the <mime-mapping> section or similar entries.
216
+
217
+
To add a new MimeMapping, use the following xml format:
218
+
<mime-mapping>
219
+
<extension>[FILE_EXTENSION]</extension>
220
+
<mime-type>[MIME_TYPE]</mime-type>
221
+
</mime-mapping>
222
+
223
+
Replace [FILE_EXTENSION] with the file extension (e.g., pdf, docx) and [MIME_TYPE] with the corresponding MIME type (e.g., application/pdf, application/vnd.openxmlformats-officedocument.wordprocessingml.document).
224
+
225
+
Save the changes to the configuration file.
226
+
227
+
**Step 3: Restart the Application (if required)**
228
+
229
+
If the changes to the configuration file require a server/application restart, perform the necessary steps to restart the application.
230
+
231
+
### Configuring MimeMappings Using Properties
232
+
**Step 1: Identify Properties File**
233
+
234
+
Locate the properties file used for configuring your application.
235
+
236
+
237
+
**Step 2: Add MimeMappings Properties**
238
+
Open the properties file.
239
+
240
+
**Add or modify properties related to MimeMappings using the following css format:**
241
+
242
+
mimeMappings.[FILE_EXTENSION]=[MIME_TYPE]
243
+
Replace [FILE_EXTENSION] with the file extension (e.g., pdf, docx) and [MIME_TYPE] with the corresponding MIME type (e.g., application/pdf, application/vnd.openxmlformats-officedocument.wordprocessingml.document).
Ensure that the application loads and utilizes these properties during runtime. This may involve a configuration setup within your application codebase to read and apply these properties for MimeMappings.
254
+
255
+
**Step 4: Restart the Application (if required)**
256
+
257
+
If changes to the properties file necessitate a server/application restart, proceed to restart the application accordingly.
258
+
206
259
207
260
== Guides
208
261
The https://spring.io/[spring.io] site contains several guides that show how to use Spring Boot step-by-step:
0 commit comments