title: Spring Profiles on method level?
body: <p>I'd like to introduce some methods that are only executed during development.</p>
  
  <p>I thought I might use <code>Spring @Profile</code> annotation here? But how can I apply this annotation on class level, so that this method is only invoked if the specific profile is configured in properties?</p>
  
  <pre><code>spring.profiles.active=dev
  </code></pre>
  
  <p>Take the following as pseudocode. How can this be done?</p>
  
  <pre><code>class MyService {
  
      void run() { 
         log();
      }
  
      @Profile("dev")
      void log() {
         //only during dev
      }
  }
  </code></pre>