I have an XML file (notice.xml) that I want to load into my Spring Boot Application. This file will be served to an API after some modification. I want this file to be loaded into the memory to minimize the I/O. What's the right way to load this file into memory at boot time, or just after start up?
Asked
Active
Viewed 758 times
1
-
What kind of data? Master Data or Reference Data? If you are not sure, please describe what informations are stored in the notice.xml!? – Grim Jan 23 '22 at 18:06
-
It contains a few statements that I need to show as part of the API responses. Not too sure of the terminologies here. – Saif Jan 23 '22 at 21:35
1 Answers
1
The easiest way is, buy loading the Resource with @Value("classpath:FILENAME)
but there are tons of ways, you can try. To get a better understanding you can look here

Marcel Herhold
- 166
- 1
- 7