我有一個關於春天classpath:
選項兩個問題: -類路徑:春季
1)是否classpath:
搜索相對於其所指定的(在Web應用程序的情況下文件)的資源?
假設我使用以下命令:
<bean class="mybean">
<property name="myresource" value="classpath:myfile.txt"/>
</bean>
在myconfig.xml下/WEB-INF/classes/config/myconfig.xml。那麼從哪裏開始搜索?
2)是否有更快的搜索,如果我給資源的直接定位,而沒有給
<bean class="mybean">
<property name="myresource" value="classpath:myfile.txt"/>
</bean>
致謝classpath:
即
<bean class="mybean">
<property name="myresource" value="classpath:/WEB-INF/classes/myfolder/myfile.txt"/>
</bean>
,而不是...