Spring : PropertyPlaceholderConfigurer cannot find property file

前端 未结 2 1728
有刺的猬
有刺的猬 2021-01-14 07:19

I have a strange problem with Spring using PropertyPlaceholderConfigurer. One of my beans is designed as follow :



        
相关标签:
2条回答
  • 2021-01-14 07:38

    try classpath*:jdbc.properties

    0 讨论(0)
  • 2021-01-14 07:40

    IANA OSGI developer, but a quick Google search results in a link to the Spring-osgi documentation. Look at section 5.4 and note that the spring-osgi package makes some changes to Resource loading. It looks like the ResourceLoader implemented by the default ApplicationContext for osgi will automatically pre-pend osgibundle: if no other prefix is provided.

    It appears as though there is some difference in scope between the path searched when using classpath: and the path used when using classpath*:, but I have so far been unable to find a good explanation for it.

    0 讨论(0)
提交回复
热议问题