-
Notifications
You must be signed in to change notification settings - Fork 135
Open
Description
举个栗子,我们来看下如何使用@ConditionalOnClass和@ConditionalOnProperty这两个注解,先看下图代码: HelloWorldEnableAutoConfiguration这个自动配置类应用了@ConditionalOnClass和ConditionalOnProperty两个条件注解,那么只有在满足:classpath中存在HelloWorldComponent.class和配置了hello.world.name和hello.world.age属性这两个条件的情况下才会创建HelloWorldComponent这个bean。
这块的代码没有啊。
Metadata
Metadata
Assignees
Labels
No labels