What does the spring annotation @ConditionalOnMissingBean do?

前端 未结 4 1601
囚心锁ツ
囚心锁ツ 2020-12-31 00:25

I am trying to start a springboot application where this annotation has been used. When I try to start the application it gives me the following error:

<
4条回答
  •  再見小時候
    2020-12-31 00:45

    The @ConditionalOnMissingBean annotation is a spring conditional annotation for registering beans only when they are not already in the application context.

    See the documentation: https://docs.spring.io/spring-boot/docs/2.0.0.RELEASE/api/org/springframework/boot/autoconfigure/condition/ConditionalOnMissingBean.html

提交回复
热议问题