Skip to content

Commit

Permalink
Unit tests for custom profile annotations on configuration classes
Browse files Browse the repository at this point in the history
Issue: SPR-11808
  • Loading branch information
jhoeller committed May 30, 2014
1 parent 31f2f20 commit 5eecb13
Showing 1 changed file with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
}

@Configuration
@Profile("dev")
@DevProfile
class DevConfig {

@Bean
Expand All @@ -52,11 +52,21 @@ public String foo() {
}

@Configuration
@Profile("prod")
@ProdProfile
class ProductionConfig {

@Bean
public String foo() {
return "Production Foo";
}
}
}

@Profile("dev")
@Retention(RetentionPolicy.RUNTIME)
@interface DevProfile {
}

@Profile("prod")
@Retention(RetentionPolicy.RUNTIME)
@interface ProdProfile {
}

0 comments on commit 5eecb13

Please sign in to comment.