What's the right way to load a file in application context in spring boot?

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?


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