Java-SourceCode-Blogs icon indicating copy to clipboard operation
Java-SourceCode-Blogs copied to clipboard

示例中代码缺少

Open yunwenlong opened this issue 3 years ago • 0 comments

举个栗子,我们来看下如何使用@ConditionalOnClass和@ConditionalOnProperty这两个注解,先看下图代码: HelloWorldEnableAutoConfiguration这个自动配置类应用了@ConditionalOnClass和ConditionalOnProperty两个条件注解,那么只有在满足:classpath中存在HelloWorldComponent.class和配置了hello.world.name和hello.world.age属性这两个条件的情况下才会创建HelloWorldComponent这个bean。 这块的代码没有啊。

yunwenlong avatar Mar 02 '22 09:03 yunwenlong