這些文件都是在什么地方?
Resource template=ctx.getResource(“some/resource/path/myTemplate.txt”); Resource template=ctx.getResource(“classpath:/some/resource/path/myTemplate.txt”); Resource template=ctx.getResource(“file:/some/resource/path/myTemplate.txt”); 這三個,第一個默認的,默認的文件一般都是在哪的文件?是工程里邊的嗎?第二是應該是工程里邊的了吧?第三個是電腦磁盤上的嗎?
2017-05-21
視頻里講解的很清楚了啊,第一個默認使用加載ctx的對應文件的方式,如果ctx對應文件的加載方式為classpath,則Resource template=ctx.getResource(“some/resource/path/myTemplate.txt”)也為從classpath下加載該文件; ?第二個是工程目錄下文件;第三個為磁盤上文件
2017-05-22
再看一遍。。。。。。