using classpath: in spring

前端 未结 2 1675
感情败类
感情败类 2020-12-05 00:24

I have two questions regarding classpath: option in spring :-

1) Does classpath: search for resource relative to the document in which it i

2条回答
  •  眼角桃花
    2020-12-05 01:00

    Take a look at http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/resources.html#resources-classpath-wildcards

    This special prefix specifies that all classpath resources that match the given name must be obtained (internally, this essentially happens via a ClassLoader.getResources(...) call), and then merged to form the final application context definition.

    So classpath: starts at the root of your classpath.

提交回复
热议问题