Skip to content

PropertiesLoaderSupport assumes file-based Resources [SPR-7547] #12204

@spring-projects-issues

Description

@spring-projects-issues

Jing Xue opened SPR-7547 and commented

I set the location of a PropertyPlaceholderConfigurer to a ByteArrayResource and got this error upon starting up:

java.lang.IllegalStateException: resource loaded from byte array does not have a filename
at org.springframework.core.io.AbstractResource.getFilename(AbstractResource.java:157)
at org.springframework.core.io.support.PropertiesLoaderSupport.loadProperties(PropertiesLoaderSupport.java:182)
at org.springframework.core.io.support.PropertiesLoaderSupport.mergeProperties(PropertiesLoaderSupport.java:161)
at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:69)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:663)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:603)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:407)


Affects: 3.0.4

Referenced from: commits b3ff9be, 1a7aebb, 05bcc40

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: coreIssues in core modules (aop, beans, core, context, expression)type: bugA general bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions