What is purpose of @ConditionalOnProperty annotation?

后端 未结 3 1758
庸人自扰
庸人自扰 2020-12-04 14:19

I just modified spring boot configuration, and encountered

@ConditionalOnProperty(prefix = \"spring.social.\", value = \"auto-connection-views\") 
         


        
3条回答
  •  伪装坚强ぢ
    2020-12-04 14:26

    Rather, it is the opposite. A precondition for implementing the method, if the property is set in the environment (development, approval, production) and is true value with the method can be executed.

    If the property is not set in the environment annotation not prevented the execution of the method.

提交回复
热议问题