public Properties getConfig(ConfigurableEnvironment env) throws IOException { PropertiesFactoryBean config = new PropertiesFactoryBean(); PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(); List<Resource> resouceList = InstanceUtil.newArrayList(); try { Resource[] resources = resolver.getResources("classpath*:config/*.properties"); for (Resource resource : resources) { resouceList.add(resource); } } catch (Exception e) { logger.error("", e); } config.setLocations(resouceList.toArray(new Resource[]{})); config.afterPropertiesSet(); return config.getObject(); }
static NamedQueries findNamedQueries(Class<?> repositoryClass) { try { RepositoryConfigurationExtension config = new SnowdropRepositoryConfigExtension(); String location = config.getDefaultNamedQueryLocation(); PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(repositoryClass.getClassLoader()); ResourceArrayPropertyEditor editor = new ResourceArrayPropertyEditor(resolver, null); editor.setAsText(location); Resource[] resources = (Resource[]) editor.getValue(); PropertiesFactoryBean pfb = new PropertiesFactoryBean(); pfb.setSingleton(false); pfb.setLocations(resources); pfb.setFileEncoding("UTF-8"); Properties properties = pfb.getObject(); return new PropertiesBasedNamedQueries(properties); } catch (IOException e) { throw new IllegalStateException(e); } }
@Test public void byTypeAutowireWithPrimaryInParentFactory() throws Exception { CountingFactory.reset(); DefaultListableBeanFactory parent = getBeanFactory("autowire-with-exclusion.xml"); parent.getBeanDefinition("props1").setPrimary(true); parent.preInstantiateSingletons(); DefaultListableBeanFactory child = new DefaultListableBeanFactory(parent); RootBeanDefinition robDef = new RootBeanDefinition(TestBean.class); robDef.setAutowireMode(RootBeanDefinition.AUTOWIRE_BY_TYPE); robDef.getPropertyValues().add("spouse", new RuntimeBeanReference("sally")); child.registerBeanDefinition("rob2", robDef); RootBeanDefinition propsDef = new RootBeanDefinition(PropertiesFactoryBean.class); propsDef.getPropertyValues().add("properties", "name=props3"); child.registerBeanDefinition("props3", propsDef); TestBean rob = (TestBean) child.getBean("rob2"); assertEquals("props1", rob.getSomeProperties().getProperty("name")); assertEquals(1, CountingFactory.getFactoryBeanInstanceCount()); }
@Test public void byTypeAutowireWithPrimaryOverridingParentFactory() throws Exception { CountingFactory.reset(); DefaultListableBeanFactory parent = getBeanFactory("autowire-with-exclusion.xml"); parent.preInstantiateSingletons(); DefaultListableBeanFactory child = new DefaultListableBeanFactory(parent); RootBeanDefinition robDef = new RootBeanDefinition(TestBean.class); robDef.setAutowireMode(RootBeanDefinition.AUTOWIRE_BY_TYPE); robDef.getPropertyValues().add("spouse", new RuntimeBeanReference("sally")); child.registerBeanDefinition("rob2", robDef); RootBeanDefinition propsDef = new RootBeanDefinition(PropertiesFactoryBean.class); propsDef.getPropertyValues().add("properties", "name=props3"); propsDef.setPrimary(true); child.registerBeanDefinition("props3", propsDef); TestBean rob = (TestBean) child.getBean("rob2"); assertEquals("props3", rob.getSomeProperties().getProperty("name")); assertEquals(1, CountingFactory.getFactoryBeanInstanceCount()); }
@Test public void byTypeAutowireWithPrimaryInParentAndChild() throws Exception { CountingFactory.reset(); DefaultListableBeanFactory parent = getBeanFactory("autowire-with-exclusion.xml"); parent.getBeanDefinition("props1").setPrimary(true); parent.preInstantiateSingletons(); DefaultListableBeanFactory child = new DefaultListableBeanFactory(parent); RootBeanDefinition robDef = new RootBeanDefinition(TestBean.class); robDef.setAutowireMode(RootBeanDefinition.AUTOWIRE_BY_TYPE); robDef.getPropertyValues().add("spouse", new RuntimeBeanReference("sally")); child.registerBeanDefinition("rob2", robDef); RootBeanDefinition propsDef = new RootBeanDefinition(PropertiesFactoryBean.class); propsDef.getPropertyValues().add("properties", "name=props3"); propsDef.setPrimary(true); child.registerBeanDefinition("props3", propsDef); TestBean rob = (TestBean) child.getBean("rob2"); assertEquals("props3", rob.getSomeProperties().getProperty("name")); assertEquals(1, CountingFactory.getFactoryBeanInstanceCount()); }
@Test public void testExpressionInStringArray() { DefaultListableBeanFactory bf = new DefaultListableBeanFactory(); BeanExpressionResolver beanExpressionResolver = mock(BeanExpressionResolver.class); when(beanExpressionResolver.evaluate(eq("#{foo}"), Matchers.any(BeanExpressionContext.class))) .thenReturn("classpath:/org/springframework/beans/factory/xml/util.properties"); bf.setBeanExpressionResolver(beanExpressionResolver); RootBeanDefinition rbd = new RootBeanDefinition(PropertiesFactoryBean.class); MutablePropertyValues pvs = new MutablePropertyValues(); pvs.add("locations", new String[]{"#{foo}"}); rbd.setPropertyValues(pvs); bf.registerBeanDefinition("myProperties", rbd); Properties properties = (Properties) bf.getBean("myProperties"); assertEquals("bar", properties.getProperty("foo")); }
public SchedulerFactoryBean build() throws Exception { SchedulerFactoryBean bean = new SchedulerFactoryBean(); PropertiesFactoryBean propertiesFactoryBean = new PropertiesFactoryBean(); propertiesFactoryBean.setLocation(new ClassPathResource(config)); propertiesFactoryBean.afterPropertiesSet(); Properties props = propertiesFactoryBean.getObject(); List<Trigger> triggers = Lists.newArrayList(); List<JobModel> jobList = getJobs(props); for (JobModel job : jobList) { if (!job.isEnable()) { continue; } JobDetailFactoryBean detail = createJobDetail(job.getName(), Class.forName(job.getJob())); CronTriggerFactoryBean trigger = createCronTrigger(job.getName(), detail.getObject(), job.getCorn()); CronTrigger t = trigger.getObject(); triggers.add(t); } bean.setTriggers(triggers.toArray(new Trigger[0])); //bean.afterPropertiesSet(); return bean; }
private Properties loadBackupProperty(String filePath) { PropertiesFactoryBean propertiesFactory = new PropertiesFactoryBean(); Properties props = new Properties(); try { FileSystemResource fileSystemResource = new FileSystemResource(filePath); propertiesFactory.setLocation(fileSystemResource); propertiesFactory.afterPropertiesSet(); props = propertiesFactory.getObject(); } catch (IOException e) { e.printStackTrace(); return null; } return props; }
@Test public void testWithPropertiesFile() throws Exception { PropertiesFactoryBean pfb = new PropertiesFactoryBean(); FileSystemResource pathResource = new FileSystemResource("test.properties"); File file = pathResource.getFile(); if (!file.exists()) { file.createNewFile(); } System.out.println("pathResource:" + pathResource.getPath()); System.out.println("pathResource:" + pathResource.getFile()); pfb.setLocation(pathResource); pfb.afterPropertiesSet(); Properties props = (Properties) pfb.getObject(); System.out.println(props.get("a")); props.setProperty("a", "DDD"); System.out.println(props.get("a")); FileOutputStream oFile = new FileOutputStream(pathResource.getFile()); props.store(oFile, "Comment"); oFile.close(); file.deleteOnExit(); }
protected void populateSubsystemBeanFactory(final ConfigurableListableBeanFactory beanFactory) { try { // build effective properties final PropertiesFactoryBean factory = new PropertiesFactoryBean(); factory.setPropertiesArray(new Properties[] { this.fixedConfigProperties, this.runtimeProperties }); factory.afterPropertiesSet(); final Properties subsystemProperties = factory.getObject(); beanFactory.registerSingleton(BEAN_NAME_SUBSYSTEM_PROPERTIES, subsystemProperties); } catch (final IOException e) { throw new AlfrescoRuntimeException("Error instantiating effective subsystem properties", e); } }
@Bean public Properties propertyFactory() throws IOException { List<Resource> resources = loadPropertyResource(); PropertiesFactoryBean factory = new PropertiesFactoryBean(); factory.setLocations(resources.toArray(new Resource[resources.size()])); factory.afterPropertiesSet(); Properties props = factory.getObject(); new ConfigAccessor().get() .getProperties() .stream() .forEach(e -> { if (props.getProperty(e._1()) == null) { props.put(e._1(), e._2()); } }); System.getProperties() .entrySet() .forEach(e -> props.put(e.getKey(), e.getValue())); return props; }
@Bean public static SSLProperties sslProperties() throws IOException { PropertiesFactoryBean factory = new PropertiesFactoryBean(); URL url = SSLConfig.class.getClassLoader().getResource("ssl.properties"); if (url != null) { Resource reource = new UrlResource(url); factory.setLocation(reource); factory.afterPropertiesSet(); Properties properties = factory.getObject(); return SSLProperties.builder() .keyStoreFile(properties.getProperty(keyStoreFile)) .keyStorePass(properties.getProperty(keyStorePass)) .trustStoreFile(properties.getProperty(trustStoreFile)) .trustStorePass(properties.getProperty(trustStorePass)) .keyStoreType(properties.getProperty(keyStoreType)) .keyStoreProvider(properties.getProperty(keyStoreProvider)) .trustStoreType(properties.getProperty(trustStoreType)) .trustStoreProvider(properties.getProperty(trustStoreProvider)) .clientAuth(properties.getProperty(clientAuth)) .ciphers(properties.getProperty(ciphers)) .protocol(properties.getProperty(protocol)).build(); } return null; }
@Bean(name = { BEAN_LOGSNIFFER_PROPS }) @Autowired public PropertiesFactoryBean logSnifferProperties(final ApplicationContext ctx) throws IOException { if (ctx.getEnvironment().acceptsProfiles("!" + ContextProvider.PROFILE_NONE_QA)) { final File qaFile = File.createTempFile("logsniffer", "qa"); qaFile.delete(); final String qaHomeDir = qaFile.getPath(); logger.info("QA mode active, setting random home directory: {}", qaHomeDir); System.setProperty("logsniffer.home", qaHomeDir); } final PathMatchingResourcePatternResolver pathMatcher = new PathMatchingResourcePatternResolver(); Resource[] classPathProperties = pathMatcher.getResources("classpath*:/config/**/logsniffer-*.properties"); final Resource[] metainfProperties = pathMatcher .getResources("classpath*:/META-INF/**/logsniffer-*.properties"); final PropertiesFactoryBean p = new PropertiesFactoryBean(); for (final Resource r : metainfProperties) { classPathProperties = (Resource[]) ArrayUtils.add(classPathProperties, r); } classPathProperties = (Resource[]) ArrayUtils.add(classPathProperties, new FileSystemResource(System.getProperty("logsniffer.home") + "/" + LOGSNIFFER_PROPERTIES_FILE)); p.setLocations(classPathProperties); p.setProperties(System.getProperties()); p.setLocalOverride(true); p.setIgnoreResourceNotFound(true); return p; }
@Bean public InMemoryUserDetailsManager propertyUserDetailsService() throws IOException { String env = System.getenv(ENVIRONMENT); if (env == null) { env = System.getProperty(ENVIRONMENT, "dev"); } PropertiesFactoryBean propertiesFactoryBean = new PropertiesFactoryBean(); propertiesFactoryBean.setLocations(new ClassPathResource("usercredentials-" + env + ".properties")); propertiesFactoryBean.afterPropertiesSet(); Properties users = propertiesFactoryBean.getObject(); return new InMemoryUserDetailsManager(users); }
public void testByTypeAutowireWithPrimaryInParentFactory() throws Exception { CountingFactory.reset(); DefaultListableBeanFactory parent = getBeanFactory("autowire-with-exclusion.xml"); parent.getBeanDefinition("props1").setPrimary(true); parent.preInstantiateSingletons(); DefaultListableBeanFactory child = new DefaultListableBeanFactory(parent); RootBeanDefinition robDef = new RootBeanDefinition(TestBean.class); robDef.setAutowireMode(RootBeanDefinition.AUTOWIRE_BY_TYPE); robDef.getPropertyValues().add("spouse", new RuntimeBeanReference("sally")); child.registerBeanDefinition("rob2", robDef); RootBeanDefinition propsDef = new RootBeanDefinition(PropertiesFactoryBean.class); propsDef.getPropertyValues().add("properties", "name=props3"); child.registerBeanDefinition("props3", propsDef); TestBean rob = (TestBean) child.getBean("rob2"); assertEquals("props1", rob.getSomeProperties().getProperty("name")); assertEquals(1, CountingFactory.getFactoryBeanInstanceCount()); }
public void testByTypeAutowireWithPrimaryOverridingParentFactory() throws Exception { CountingFactory.reset(); DefaultListableBeanFactory parent = getBeanFactory("autowire-with-exclusion.xml"); parent.preInstantiateSingletons(); DefaultListableBeanFactory child = new DefaultListableBeanFactory(parent); RootBeanDefinition robDef = new RootBeanDefinition(TestBean.class); robDef.setAutowireMode(RootBeanDefinition.AUTOWIRE_BY_TYPE); robDef.getPropertyValues().add("spouse", new RuntimeBeanReference("sally")); child.registerBeanDefinition("rob2", robDef); RootBeanDefinition propsDef = new RootBeanDefinition(PropertiesFactoryBean.class); propsDef.getPropertyValues().add("properties", "name=props3"); propsDef.setPrimary(true); child.registerBeanDefinition("props3", propsDef); TestBean rob = (TestBean) child.getBean("rob2"); assertEquals("props3", rob.getSomeProperties().getProperty("name")); assertEquals(1, CountingFactory.getFactoryBeanInstanceCount()); }
public void testByTypeAutowireWithPrimaryInParentAndChild() throws Exception { CountingFactory.reset(); DefaultListableBeanFactory parent = getBeanFactory("autowire-with-exclusion.xml"); parent.getBeanDefinition("props1").setPrimary(true); parent.preInstantiateSingletons(); DefaultListableBeanFactory child = new DefaultListableBeanFactory(parent); RootBeanDefinition robDef = new RootBeanDefinition(TestBean.class); robDef.setAutowireMode(RootBeanDefinition.AUTOWIRE_BY_TYPE); robDef.getPropertyValues().add("spouse", new RuntimeBeanReference("sally")); child.registerBeanDefinition("rob2", robDef); RootBeanDefinition propsDef = new RootBeanDefinition(PropertiesFactoryBean.class); propsDef.getPropertyValues().add("properties", "name=props3"); propsDef.setPrimary(true); child.registerBeanDefinition("props3", propsDef); TestBean rob = (TestBean) child.getBean("rob2"); assertEquals("props3", rob.getSomeProperties().getProperty("name")); assertEquals(1, CountingFactory.getFactoryBeanInstanceCount()); }
/** * Instantiates a new application context state. * * @throws IOException * Signals that an I/O exception has occurred. */ protected ApplicationContextState(boolean allowInitAccess ) throws IOException { this.allowInitAccess = allowInitAccess; // Load the property defaults PropertiesFactoryBean factory = new PropertiesFactoryBean(); factory.setPropertiesPersister(getPersister()); factory.setLocations(getParent().getResources( ChildApplicationContextFactory.CLASSPATH_PREFIX + getCategory() + '/' + getTypeName() + ChildApplicationContextFactory.PROPERTIES_SUFFIX)); factory.afterPropertiesSet(); this.properties = (Properties) factory.getObject(); }
/** * Configure quartz using properties file */ @Bean public Properties quartzProperties() throws IOException { PropertiesFactoryBean propertiesFactoryBean = new PropertiesFactoryBean(); propertiesFactoryBean.setLocation(new ClassPathResource("/quartz.properties")); propertiesFactoryBean.afterPropertiesSet(); return propertiesFactoryBean.getObject(); }
@Bean public Properties quartzProperties() throws IOException { PropertiesFactoryBean propertiesFactoryBean = new PropertiesFactoryBean(); propertiesFactoryBean.setLocations(new FileSystemResource("quartz.properties")); propertiesFactoryBean.afterPropertiesSet(); return propertiesFactoryBean.getObject(); }
@Bean public Properties quartzProperties() throws IOException { PropertiesFactoryBean propertiesFactoryBean = new PropertiesFactoryBean(); propertiesFactoryBean.setLocation(new ClassPathResource("/quartz.properties")); propertiesFactoryBean.afterPropertiesSet(); return propertiesFactoryBean.getObject(); }
private Properties loadConfigLocationProperties(ApplicationContext applicationContext, QuartzSchedulerProperties properties) throws IOException { String location = properties.getPropertiesConfigLocation(); if(null == location || location.trim().length() == 0) { location = QuartzSchedulerProperties.DEFAULT_CONFIG_LOCATION; LOGGER.debug("using default 'quartz.properties' from classpath: " + location); } else { LOGGER.debug("using 'quartz.properties' from location: " + location); } PropertiesFactoryBean propertiesFactoryBean = new PropertiesFactoryBean(); propertiesFactoryBean.setLocation(applicationContext.getResource(location)); propertiesFactoryBean.afterPropertiesSet(); return propertiesFactoryBean.getObject(); }
@Bean(name = QuartzSchedulerAutoConfiguration.QUARTZ_PROPERTIES_BEAN_NAME) public Properties quartzProperties( @Autowired ApplicationContext applicationContext, @Autowired QuartzSchedulerProperties properties) throws IOException { System.out.println("my overridden quartz.properties loading"); PropertiesFactoryBean propertiesFactoryBean = new PropertiesFactoryBean(); propertiesFactoryBean.setLocation(applicationContext.getResource("classpath:overriddenQuartzScheduler.properties")); propertiesFactoryBean.afterPropertiesSet(); return propertiesFactoryBean.getObject(); }
@Bean(name = Global.BEAN_NAME_ROOT_PROPS) public PropertiesFactoryBean getPropertiesFactoryBean() { PropertiesFactoryBean bean = new PropertiesFactoryBean(); Resource[] resources = getPropsResources(resourceLoader); bean.setLocations(resources); return bean; }
@Bean public Properties quartzProperties() throws IOException { final PropertiesFactoryBean propertiesFactoryBean = new PropertiesFactoryBean(); propertiesFactoryBean.setLocation(new ClassPathResource("/configuration/quartz.properties")); propertiesFactoryBean.afterPropertiesSet(); return propertiesFactoryBean.getObject(); }
@Test public void testEvents() { ComponentDefinition propertiesComponent = this.listener.getComponentDefinition("myProperties"); assertNotNull("Event for 'myProperties' not sent", propertiesComponent); AbstractBeanDefinition propertiesBean = (AbstractBeanDefinition) propertiesComponent.getBeanDefinitions()[0]; assertEquals("Incorrect BeanDefinition", PropertiesFactoryBean.class, propertiesBean.getBeanClass()); ComponentDefinition constantComponent = this.listener.getComponentDefinition("min"); assertNotNull("Event for 'min' not sent", propertiesComponent); AbstractBeanDefinition constantBean = (AbstractBeanDefinition) constantComponent.getBeanDefinitions()[0]; assertEquals("Incorrect BeanDefinition", FieldRetrievingFactoryBean.class, constantBean.getBeanClass()); }
@Test public void testRegisterExistingSingletonWithNameOverriding() { DefaultListableBeanFactory lbf = new DefaultListableBeanFactory(); Properties p = new Properties(); p.setProperty("test.(class)", TestBean.class.getName()); p.setProperty("test.name", "Tony"); p.setProperty("test.age", "48"); p.setProperty("test.spouse(ref)", "singletonObject"); (new PropertiesBeanDefinitionReader(lbf)).registerBeanDefinitions(p); lbf.registerBeanDefinition("singletonObject", new RootBeanDefinition(PropertiesFactoryBean.class)); Object singletonObject = new TestBean(); lbf.registerSingleton("singletonObject", singletonObject); lbf.preInstantiateSingletons(); assertTrue(lbf.isSingleton("singletonObject")); assertEquals(TestBean.class, lbf.getType("singletonObject")); TestBean test = (TestBean) lbf.getBean("test"); assertEquals(singletonObject, lbf.getBean("singletonObject")); assertEquals(singletonObject, test.getSpouse()); Map<?, ?> beansOfType = lbf.getBeansOfType(TestBean.class, false, true); assertEquals(2, beansOfType.size()); assertTrue(beansOfType.containsValue(test)); assertTrue(beansOfType.containsValue(singletonObject)); beansOfType = lbf.getBeansOfType(null, false, true); Iterator<String> beanNames = lbf.getBeanNamesIterator(); assertEquals("test", beanNames.next()); assertEquals("singletonObject", beanNames.next()); assertFalse(beanNames.hasNext()); assertEquals(2, beansOfType.size()); assertTrue(lbf.containsSingleton("test")); assertTrue(lbf.containsSingleton("singletonObject")); assertTrue(lbf.containsBeanDefinition("test")); assertTrue(lbf.containsBeanDefinition("singletonObject")); }
@Bean public Properties quartzProperties() { PropertiesFactoryBean propertiesFactoryBean = new PropertiesFactoryBean(); propertiesFactoryBean.setLocation(new ClassPathResource("/quartz.properties")); Properties properties = null; try { propertiesFactoryBean.afterPropertiesSet(); properties = propertiesFactoryBean.getObject(); } catch (IOException e) { log.warn("Cannot load quartz.properties."); } return properties; }
@Bean public PropertiesFactoryBean vendorProperties() { Properties properties = new Properties(); properties.put("SQL Server", "sqlserver"); properties.put("DB2", "db2"); properties.put("H2", "h2"); PropertiesFactoryBean propertiesFactoryBean = new PropertiesFactoryBean(); propertiesFactoryBean.setProperties(properties); return propertiesFactoryBean; }
@Bean(name = "hibernateDefaultExtraProperties") public PropertiesFactoryBean hibernateDefaultExtraProperties(@Value("${hibernate.defaultExtraPropertiesUrl}") Resource defaultExtraPropertiesUrl) { PropertiesFactoryBean f = new PropertiesFactoryBean(); f.setIgnoreResourceNotFound(false); f.setFileEncoding("UTF-8"); f.setLocations(defaultExtraPropertiesUrl); return f; }
@Bean(name = "hibernateExtraProperties") public PropertiesFactoryBean hibernateExtraProperties(@Value("${hibernate.extraPropertiesUrl}") Resource extraPropertiesUrl) { PropertiesFactoryBean f = new PropertiesFactoryBean(); f.setIgnoreResourceNotFound(true); f.setFileEncoding("UTF-8"); f.setLocations(extraPropertiesUrl); return f; }
public static JFishProperties loadAsJFishProperties(String... classpaths){ PropertiesFactoryBean pfb = createPropertiesBySptring(classpaths); try { pfb.afterPropertiesSet(); JFishProperties properties = (JFishProperties)pfb.getObject(); return properties; } catch (IOException e) { throw new BaseException("load config error: " + e.getMessage(), e); } }
public static PropertiesFactoryBean createPropertiesBySptring(JFishProperties properties, String...classpaths) { // PropertiesFactoryBean pfb = new PropertiesFactoryBean(); PropertiesFactoryBean pfb = new JFishPropertiesFactoryBean(properties); pfb.setIgnoreResourceNotFound(true); org.springframework.core.io.Resource[] resources = new org.springframework.core.io.Resource[classpaths.length]; int index = 0; for(String classpath : classpaths){ resources[index++] = classpath(classpath); } pfb.setLocations(resources); return pfb; }
/** * Version. * * @return the properties factory bean */ @Bean(name = "version") public PropertiesFactoryBean version() { logger.debug("Instantiated version"); PropertiesFactoryBean bean = new PropertiesFactoryBean(); bean.setLocation(new ClassPathResource("version.properties")); return bean; }
public void testEvents() throws Exception { ComponentDefinition propertiesComponent = this.listener.getComponentDefinition("myProperties"); assertNotNull("Event for 'myProperties' not sent", propertiesComponent); AbstractBeanDefinition propertiesBean = (AbstractBeanDefinition) propertiesComponent.getBeanDefinitions()[0]; assertEquals("Incorrect BeanDefinition", PropertiesFactoryBean.class, propertiesBean.getBeanClass()); ComponentDefinition constantComponent = this.listener.getComponentDefinition("min"); assertNotNull("Event for 'min' not sent", propertiesComponent); AbstractBeanDefinition constantBean = (AbstractBeanDefinition) constantComponent.getBeanDefinitions()[0]; assertEquals("Incorrect BeanDefinition", FieldRetrievingFactoryBean.class, constantBean.getBeanClass()); }
@Bean public PropertiesFactoryBean attributeMappingValidatorMessages () { final PropertiesFactoryBean properties = new PropertiesFactoryBean (); properties.setLocation (new ClassPathResource ("nl/ipo/cds/etl/attributemapping/validator.messages")); return properties; }
@Bean public PropertiesFactoryBean harvesterMessages () { final PropertiesFactoryBean properties = new PropertiesFactoryBean (); properties.setLocation (new ClassPathResource ("nl/ipo/cds/etl/harvest/harvest.messages")); return properties; }