title: Method loading in Spring Boot even though it's not specified in Spring Boot Profile
body: <p>I have a method that I don't want loaded in my Local Spring profile. The method is </p>
  
  <pre><code>@Profile("prod")
  @Scheduled(initialDelay = 1000, fixedDelay = 21600000)
  public void updateHackalistHackathonData() {
  ...
  }
  </code></pre>
  
  <p>I have created an <code>application.properties'</code>, <code>application-local.properties'</code> and <code>application-prod.properties</code> file in the same location <code>src/java/resources</code>. In <code>application.properties</code>, I mentioned <code>spring.profiles.active=local</code>.</p>
  
  <p>However, this method which is a scheduled one still goes into execution. How do I stop this?</p>