提交 5eecb138 编写于 作者: J Juergen Hoeller

Unit tests for custom profile annotations on configuration classes

Issue: SPR-11808
上级 31f2f203
......@@ -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";
}
}
\ No newline at end of file
}
@Profile("dev")
@Retention(RetentionPolicy.RUNTIME)
@interface DevProfile {
}
@Profile("prod")
@Retention(RetentionPolicy.RUNTIME)
@interface ProdProfile {
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册