List of usage examples for org.springframework.beans.factory.config PropertyOverrideConfigurer setOrder
public void setOrder(int order)
From source file:se.ivankrizsan.messagecowboy.ProductionPropertyOverrides.java
/** * Overrides properties configured on beans. *//*from w w w .j ava 2 s . c o m*/ @Bean() @Lazy(false) @Scope(ConfigurableBeanFactory.SCOPE_SINGLETON) public static BeanFactoryPostProcessor propertyOverrideConfigurer() { PropertyOverrideConfigurer theOverrideConfigurer = new PropertyOverrideConfigurer(); final Properties thePropertiesHolder = new Properties(); /* Task refresh interval. */ thePropertiesHolder.put("starterService.taskReschedulingCronExpression", "0/20 * * * * ?"); /* Transport service configuration refresh interval. */ thePropertiesHolder.put("starterService.transportServiceConfigurationRefreshCronExpression", "0/30 * * * * ?"); /* Task execution status reports cleanup interval. */ thePropertiesHolder.put("starterService.taskExecutionStatusCleanupCronExpression", "0/30 0/15 * * * ?"); theOverrideConfigurer.setProperties(thePropertiesHolder); theOverrideConfigurer.setIgnoreInvalidKeys(false); theOverrideConfigurer.setIgnoreResourceNotFound(false); theOverrideConfigurer.setOrder(0); return theOverrideConfigurer; }
From source file:se.ivankrizsan.messagecowboy.integrationtest.taskexecutionstatuscleanup.TaskExecutionStatusCleanupTestConfiguration.java
/** * Overrides properties configured on beans. */// w w w. j a v a 2 s . com @Bean() @Lazy(false) @Scope(ConfigurableBeanFactory.SCOPE_SINGLETON) public static BeanFactoryPostProcessor propertyOverrideConfigurer() { PropertyOverrideConfigurer theOverrideConfigurer = new PropertyOverrideConfigurer(); final Properties thePropertiesHolder = new Properties(); /* Task refresh interval. */ thePropertiesHolder.put("starterService.taskReschedulingCronExpression", "* 4/30 * * * ?"); /* Transport service configuration refresh interval. */ thePropertiesHolder.put("starterService.transportServiceConfigurationRefreshCronExpression", "* 5/30 * * * ?"); /* Task execution status reports cleanup interval. */ thePropertiesHolder.put("starterService.taskExecutionStatusCleanupCronExpression", "0/5 * * * * ?"); theOverrideConfigurer.setProperties(thePropertiesHolder); theOverrideConfigurer.setIgnoreInvalidKeys(false); theOverrideConfigurer.setIgnoreResourceNotFound(false); theOverrideConfigurer.setOrder(0); return theOverrideConfigurer; }