Spring annotation conditionalOnBean not working

前端 未结 2 582
慢半拍i
慢半拍i 2021-01-11 15:00

I defined a class with annotation Configuration

    @Configuration
    @AutoConfigureAfter(EndpointAutoConfiguration         


        
2条回答
  •  隐瞒了意图╮
    2021-01-11 15:28

    ConditionalOnClass worked as well.

    Javadoc said that AutoConfigureAfter should be applied after other specified auto-configuration classes.

    And ConditionalOnClass matches when the specified classes are on the classpath. I think it's properer

提交回复
热议问题