Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You have to provide an active profile for current context. This token can be set as: <br><em>an Environment Variable</em> <br><em>a JVM Property</em> <br><em>Web Parameter</em> <br><em>Programmatic</em> <br>Spring also looks for the token, spring.profiles.default, which can be used to set the default profile(s) if none are specified with spring.profiles.active.</p> <p>Example:</p> <pre><code>&lt;servlet&gt; &lt;servlet-name&gt;spring&lt;/servlet-name&gt; &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt; &lt;init-param&gt; &lt;param-name&gt;spring.profiles.active&lt;/param-name&gt; &lt;param-value&gt;web-dev&lt;/param-value&gt; &lt;/init-param&gt; &lt;/servlet&gt; </code></pre> <p>where applicationContext looks like:</p> <pre><code>&lt;beans profile="web-dev, test-dev"&gt; &lt;import resource="trace-context.xml"/&gt; &lt;import resource="spring-data-jpa.xml"/&gt; &lt;import resource="spring-security-roles.xml" /&gt; &lt;/beans&gt; &lt;beans profile="web-dev"&gt; &lt;bean id="deployProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean" p:location="/WEB-INF/spring.properties" /&gt; &lt;import resource="spring-cache.xml"/&gt; &lt;import resource="tiles-context.xml" /&gt; &lt;import resource="themes-context.xml" /&gt; &lt;/beans&gt; &lt;beans profile="test-dev"&gt; &lt;bean id="deployProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean" p:location="classpath:spring.properties" /&gt; &lt;/beans&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload