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