title: Java spring boot configuration properties not loaded EnableConfigurationProperties not working
body: <p>I got values in my spring boot application.properties I am unable to use it in my java class.
   when i do <code>System.out.println("@@@@ "+onlinePajakProperties.getAuthentication());</code> data is not shown, null pointer error.</p>
  
  <p>application.properties</p>
  
  <pre><code>pajak.authentication = tLFGed7iTD1rztqn9z8aMS0PkCPqBW0i
  
  
  @EnableScheduling
  @SpringBootApplication
  @EnableConfigurationProperties({    
      OnlinePajakProperties.class
  })
  public class Application {
  
      public static void main(String[] args) {
          SpringApplication.run(NextGenAccountingApplication.class, args);
      }
  
  }
  
  
  import org.springframework.boot.context.properties.ConfigurationProperties;
  import org.springframework.context.annotation.Configuration;
  import org.springframework.stereotype.Component;
  
  import lombok.Data;
  
  @Configuration
  @ConfigurationProperties(prefix = "pajak")
  public class OnlinePajakProperties {
      private String  authentication;
  
      public String getAuthentication() {
          return authentication;
      }
  }
  
  
  @Service
  public class APISservice {
  
      String urlPath;
  
      @Autowired
      private OnlinePajakProperties onlinePajakProperties;
  
      public void getvalue(){
          if(onlinePajakProperties == null) {
              System.out.println("onlinePajakProperties  is NUll");
          }
          //this line shows no data
          System.out.println("@@@@ "+onlinePajakProperties.getAuthentication());      
      }
  }
  </code></pre>