Unit tests for custom profile annotations on configuration classes
Issue: SPR-11808
This commit is contained in:
parent
31f2f20307
commit
5eecb138f6
|
|
@ -42,7 +42,7 @@ public @interface MetaContextHierarchyConfig {
|
|||
}
|
||||
|
||||
@Configuration
|
||||
@Profile("dev")
|
||||
@DevProfile
|
||||
class DevConfig {
|
||||
|
||||
@Bean
|
||||
|
|
@ -52,11 +52,21 @@ class DevConfig {
|
|||
}
|
||||
|
||||
@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 {
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue