This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

2 different <context:property-placeholder: Could not resolve property placeholder  RSS feed

 
H Paul
Ranch Hand
Posts: 491
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Loaded via web:





Exception:



Why exception for : <property name="url" value="${url}"/> from applicationContext-jpa.xml

 
H Paul
Ranch Hand
Posts: 491
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
0. To debug:


1. only loaded classpath:concepts/dao/jpa/accessdb.properties

INFO : org.springframework.context.support.PropertySourcesPlaceholderConfigurer - Loading properties file from class path resource [concepts/dao/jpa/accessdb.properties]


2. why exception because classpath:concepts/dao/jpa/hsqldb.properties
was not loaded. So 'url' could not be resolved.



3. 1 possible solution:


4. The best is yet to come. (propose a better one if have.)
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
for you scenario you only need one, there is nothing wrong with loading multiple propery files using one configurer. If you really needed multiples you should use the 'order' property.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!