Spring bean creation conditionally @ConditionalOn

I would like to create a Bean only when httpPort value not equals -1. I tried below code but It is complaining something wrong with the expression. Could you please fix this? or how to achieve my requirements.

I am using Java 8 and Spring Boot 1.5.4

I tried below options

@ConditionalOnExpression("'${httpPort}' ne '-1'")
@ConditionalOnExpression("'${httpPort}' != '-1'")
@ConditionalOnExpression("!'${httpPort}'=='-1'")
@ConditionalOnExpression("!'${httpPort == -1}'")
@ConditionalOnExpression("!${httpPort == -1}")

Most of the cases error is EL1041E: After parsing a valid expression,
there is still more data in the expression: ‘lcurly({)’

@Configuration
public class TomcatConfig {
    @Value("${server.http.port:-1}")
    private int httpPort;

    @Bean
    @ConditionalOnExpression("'${httpPort}' ne '-1'")
    public EmbeddedServletContainerCustomizer containerCustomizer() {
        return new EmbeddedServletContainerCustomizer() {
            @Override
            public void customize(ConfigurableEmbeddedServletContainer container) {
                if (container instanceof TomcatEmbeddedServletContainerFactory) {
                    TomcatEmbeddedServletContainerFactory containerFactory =
                            (TomcatEmbeddedServletContainerFactory) container;

                    Connector connector = new Connector(TomcatEmbeddedServletContainerFactory.DEFAULT_PROTOCOL);
                    connector.setPort(httpPort);
                    containerFactory.addAdditionalTomcatConnectors(connector);
                }
            }
        };
    }
}

Solved this by @ConditionalOnProperty(“server.http.port”)

@ConditionalOnProperty("server.http.port")
public EmbeddedServletContainerCustomizer containerCustomizer() {
}