title: How can I set active profile via annotation in spring?
body: <p>How can I set active profile via annotation in spring ?</p>
  
  <p>For example:</p>
  
  <pre><code>@RunWith(SpringJUnit4ClassRunner.class)
  @ContextConfiguration(classes = { ApplicationConfig.class }, loader = AnnotationConfigContextLoader.class)
  @ActiveProfiles( profiles = {ApplicationProfiles.TEST} )
  public class CacheManagerTest {
       ...
  }
  </code></pre>
  
  <p>For JUnit test this works perfect, but how can I init production application context ? (I do not have any main method/сlasses)</p>