Beans environment profile does not work
I am trying to configure bean profiles but it does not work,
I see in the log the message:
DEBUG 2012-12-12 13:27:00,815 [main] core.env.PropertySourcesPropertyResolver - Found key 'spring.profiles.active' in [systemProperties] with type [String] and value 'dev'
DEBUG 2012-12-12 13:27:00,824 [main] core.env.StandardEnvironment - Activating profile 'dev'
which means that the profile was activated but it does not seem to work, can any one help me with this?
Here is the xml configuration:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<beans profile="dev">
<import resource="com.leadspace.common.msg.amq.xml" />
<!-- ********************* Task executors ************************ -->
<bean id="workersTaskExecutor" class="com.leadspace.common.messaging.taskexecutors.WorkersTaskExecutor">
<property name="taskExecutor" ref="threadPoolExecutor"/>
</bean>
<bean id="threadPoolExecutor" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
<property name="corePoolSize" value="20"/>
<property name="queueCapacity" value="40"/>
<property name="keepAliveSeconds" value="600"/>
<property name="maxPoolSize" value="50"/>
</bean>
<!-- ********************* Task Services ************************ -->
<bean id="taskService" class="com.leadspace.common.messaging.services.BasicTaskService"
abstract="true"
scope="singleton">
<property name="taskExecutor" ref="workersTaskExecutor" />
</bean>
<bean id="taskServiceDispatcher"
class="com.leadspace.common.messaging.services.BasicTaskService"
parent="taskService" scope="singleton">
<property name="taskExecutor" ref="jmsSenderTaskExecutor"/>
</bean>
<bean id="taskServiceExecutor"
class="com.leadspace.common.messaging.services.BasicTaskService"
parent="taskService" scope="singleton">
<property name="taskExecutor" ref="workersTaskExecutor"/>
</bean>
<!-- ********************* Logics ************************ -->
<bean id="runSpotLightProject"
class="com.leadspace.controller.messaging.logics.RunSpotLightProject">
<property name="service" ref="spotlightResultsService" />
</bean>
<bean id="handleSpotlightResult"
class="com.leadspace.controller.task.SpotlightResultHandler">
</bean>
<!-- ********************* Services ************************ -->
<bean id="service" class="com.leadspace.common.messaging.services.AbstractService"
abstract="true"
scope="prototype">
<property name="taskService" ref="taskService" />
</bean>
<bean id="spotlightResultsService" class="com.leadspace.controller.messaging.services.SpotlightResultService"
scope="prototype">
<property name="taskService" ref="taskServiceDispatcher" />
</bean>
</beans>
</beans>