Activating Spring Active Profile JVM Arguments in GWT Hosting Mode
I have a spring profile configuration as shown below
<beans profile="dev">
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
<property name="driverClass" value="${db.driverClassName}" />
<property name="jdbcUrl" value="dfgdfg" />
<property name="user" value="${db.username}" />
<property name="password" value="${db.password}" />
</bean>
</beans>
<beans profile="prod">
<jee:jndi-lookup id="dataSource" jndi-name="jdbc/Test"/>
</beans>
I am trying to make one of these active using the VM argument -Dspring.profiles.active="dev". This works in Tomcat, as well context-paramas the hosted route through the gwt-maven-plugin, but I cannot get the VM arguments to work. I tried mvn -Dspring.profiles.active="dev" gwt:runalso tried passing -Dspring.profiles.active="dev"through the VM arguments under the JRE tab in the launch configurations along with the target gwt:run. I also tried the environment tab and even -Dspring.profiles.active=dev, but NoSuchBeanDefinitionExceptiondid not budge. Is this due to the limited capability of the embedded server?