0

I have an annotated bean with @Component that gets built using <context:component-scan/>, however I wish to set a boolean property after this has been created from a value within a properties file using <context:property-placeholder/>.

Brett Ryan
  • 26,937
  • 30
  • 128
  • 163

1 Answers1

2

Annotate the field with @Value("propertyName").

See related question: Spring @Value annotation in @Controller class not evaluating to value inside properties file

Community
  • 1
  • 1
Rylander
  • 19,449
  • 25
  • 93
  • 144