简体   繁体   中英

How to load any file present under the conf or resources directory in Spring

I am asking a very naive and newbie question.

Can anybody please tell me the correct way to load a file present under the src/conf or src/resources directory into my Java class using Spring.

The spring way would be using the ResourceLoader .

@See Spring Reference - Chapter 4.4 The ResourceLoader

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM