code: @Override
      public void initialize(ConfigurableApplicationContext applicationContext) {
          String activeProfile = System.getProperty("spring.profiles.active");
          if (SpringProfiles.OSGI.equalsIgnoreCase(activeProfile)) {
              LOGGER.info("Running in OSGI environment");
          } else if (SpringProfiles.NON_OSGI.equalsIgnoreCase(activeProfile)) {
              LOGGER.info("Running in a non OSGI environment");
          } else {
              applicationContext.getEnvironment().setActiveProfiles(SpringProfiles.NON_OSGI);
              applicationContext.refresh();
              LOGGER.info("Switched to a non OSGI environment");
          }
      }
docs: {@inheritDoc}
  <p>
  Depending on the underlying platform, different Spring profiles are included.