title: Spring profile default behaviour
body: <p>I have a spring profile "DEV" and thats the only profile I have and I do NOT want to create a "production" profile. So only when profile is "DEV" I would like a certain type of bean for spring security is initiated (which is an in memory guest user and a userdetails bean) </p>
  
  <p>But if no spring profile is provided in my tomcat startup, which is the case in production, I would like my app to continue what it is already doing(using ldap authenticatin provider).</p>
  
  <p>Is there a way to define a "default" bean behaviour without actually needing to provide a profile at start up? Or you can look at my code below and suggest a different solution maybe.</p>
  
  <pre><code>@Autowired
  public void configureGlobal(final AuthenticationManagerBuilder auth, final AuthenticationProvider provider) throws Exception {
  
          auth
                  .eraseCredentials(false)
                  .authenticationProvider(provider)
                  .authenticationProvider(jwtConfig.jwtAuthenticationProvider());
  }
  
  
  @Bean
  public UserDetailsService userDetailsService() {
      final LdapUserDetailsService ldapUserDetailsService = new LdapUserDetailsService(ldapUserSearch(), ldapAuthoritiesPopulator());
      return new CompositeUserDetailsService(Arrays.asList(technicalUserDetailsService(), ldapUserDetailsService));
  }
  
  @Bean
  @Profile("DEV")
  public UserDetailsService devUserDetailsService() {
   useAnonymous = true;
          InMemoryUserDetailsManagerBuilder b = new InMemoryUserDetailsManagerBuilder()
                  .withUser("user").password("password").authorities(ROLE_USER, ROLE_ADMIN).and();
  
          return new CompositeUserDetailsService(Arrays.asList(b.build(),
                  technicalUserDetailsService()));
  
  }
  @Bean
  public AuthenticationProvider ldapAuthenticationProvider() {
      final BindAuthenticator ba = new BindAuthenticator((BaseLdapPathContextSource) contextSource());
      ba.setUserSearch(ldapUserSearch());
      return new LdapAuthenticationProvider(ba, ldapAuthoritiesPopulator());
  }
  </code></pre>