Skip to content

Process @ImportResource with current ResourceLoader [SPR-7973] #12628

@spring-projects-issues

Description

@spring-projects-issues

Keith Donald opened SPR-7973 and commented

I found the following odd with @ImportResource usage:

  1. The @ImportResource ResourceLoader does not appear to be the same ResourceLoader as the ApplicationContext. I am using a AnnotationConfigWebApplicationContext, and I got classpath-relative resources by default.

  2. Configuration-class relative resource resolution does not work, and one might expect it to. For example, if I import @ImportResource("mvc-interceptors.xml") from the com.springsource.greenhouse.config.mvc package, I'd expect "mvc-interceptors.xml" to be in that package, and not the root of the classpath. Having to specify "com/springsource/greenhouse/config/mvc/mvc-interceptors.xml" is a lot more to type and feels strange.


Affects: 3.1 M1

Attachments:

Issue Links:

Referenced from: commits 4cdb04a

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions