ClassPathResource classPathResource =newClassPathResource("test.txt"); 獲取文件:classPathResource .getFile(); 獲取文件流:classPathResource .getInputStream(); 第二種是內(nèi)嵌web容器,其特點(diǎn)是只有一個(gè)jar文件,在容器啟動(dòng)后不會(huì)解壓縮,項(xiàng)目實(shí)際訪問時(shí)jar包或者war包 ...
www.dbjr.com.cn/program/292708t...htm 2025-5-31