• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Bean Autowiring, PropertyPlaceholderConfigurer

 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys,

I am currently switching to the spring auto wiring mechanism and face the following problem.



Using the plain xml configuration, I would wire the config value in using the PropertyPlaceholderConfigurer and then simply pass the value using <constructor-arg value="${prop.name}" />

How would I do this in the auto wiring world??


Thank's for your help
 
James Boswell
Bartender
Posts: 1051
5
Chrome Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As of Spring 3, you can use @Value:


 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Awesome.

The PropertyPlaceholderConfigurer get's set up in the spring context the usual way right ?
 
James Boswell
Bartender
Posts: 1051
5
Chrome Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe so Sebastian.
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok cool ... thank's for your help.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic