Can I define System Properties within Spring Boot configuration files?
<p>I have a single <code>application.yml</code> configuration file for my Spring Boot app that defines two profiles (as described in the <a href="https://docs.spring.io/spring-boot/docs/current/reference/html/howto-properties-and-configuration.html#howto-change-configuration-depending-on-the-environment" rel="noreferrer">documentation</a>). </p>

<p>When the production profile is enabled, I would like to set the <a href="http://docs.oracle.com/javase/8/docs/api/java/net/doc-files/net-properties.html#MiscHTTP" rel="noreferrer"><code>http.maxConnections</code></a> system property to a custom value, e.g.</p>

<pre><code>spring:
    profiles:
        active: dev
---
spring:
    profiles: dev
---
spring:
    profiles: production
http:
    maxConnections: 15
</code></pre>

<p>But this doesn't actually set the system level property; it appears to just create an application-level property. I've verified this through both <a href="http://locahost:8080/env" rel="noreferrer">http://locahost:8080/env</a> and a JMX Console when comparing launching by </p>

<pre><code>java -jar -Dspring.profiles.active=production myapp.jar
</code></pre>

<p>versus </p>

<pre><code>java -Dhttp.maxConnections=15 myapp.jar
</code></pre>

<p>I suppose I could create a bean that's <code>@Conditional</code> on the "production" profile that programmatically calls<code>System.setProperty</code> based on my <code>application.yml</code>-defined property, but is there a simpler way through configuration files alone?</p>