Use @ConditionalOnExpression
annotation and SpEL expression as described here http://docs.spring.io/spring/docs/current/spring-framework-reference/html/expressions.html.
Example:
@Controller
@ConditionalOnExpression("${controller.enabled} and ${some.value} > 10")
public class WebController {