title: @Value in spring boot is not injecting value from application.properties
body: <p>I am using EasyRules API in my code. Following is a rule class which accesses a double value from <code>application.properties</code> file present in <code>src/main/resources</code>:</p>
  
  <pre><code>@Rule(name = "Over-weight rule") // to indicate that this class is a rule
  @PropertySource("/application.properties")
  public class OverweightRule {
  
      /**
       * The user input which represents the data
       * that the rule will operate on.
      */
      private Metric metric;
  
      @Autowired
      @Qualifier("alertServiceDao")
      private AlertService alertService;
  
      @Value("${base.weight}")
      private double baseWeight;
  
      public OverweightRule(Metric metric) {
          this.metric = metric;
      }
  
      @Condition
      public boolean isOverweight() {
          // The rule should be applied only if the
          // weight in metric object shoots 10% over the base weight.
          if(metric.getWeight() &gt; (baseWeight + (0.1 * baseWeight))) return true;
          return false;
      }
  
      @Action
      public void createAndStoreOverweightAlert() {
          // When rule conditions are satisfied,
          // an alert is created.
          Alert alert = new Alert();
          alert.setAlertType(Alert.AlertType.OVER_WEIGHT);
          alert.setWeight(metric.getWeight());
          alert.setTimeStamp(metric.getTimeStamp());
          alertService.createAlert(alert);
      }
  }
  </code></pre>
  
  <p>The value in baseWeight is always 0.0 whereas I have set it to 150.0 in properties file. I read that Spring boot automatically reads values from <code>application.properties</code> file present in <code>src/main/resources</code> so no need to use <code>@PropertySource("/path to properties file")</code>. Still I added <code>@PropertySource</code> annotation but the result was same. What is wrong in this code? I do not want to add <code>@Configuration</code> to this class because I want to keep this class as a Rule class defined by easy rules framework.</p>