Search in sources :

Example 21 with PropertiesFactoryBean

use of org.springframework.beans.factory.config.PropertiesFactoryBean in project goci by EBISPOT.

the class SparqlConfigurator method mapper.

@Bean(name = "prefixProperties")
public PropertiesFactoryBean mapper() {
    PropertiesFactoryBean bean = new PropertiesFactoryBean();
    bean.setLocation(new ClassPathResource("prefix.properties"));
    return bean;
}
Also used : PropertiesFactoryBean(org.springframework.beans.factory.config.PropertiesFactoryBean) ClassPathResource(org.springframework.core.io.ClassPathResource) PropertiesFactoryBean(org.springframework.beans.factory.config.PropertiesFactoryBean) Bean(org.springframework.context.annotation.Bean)

Example 22 with PropertiesFactoryBean

use of org.springframework.beans.factory.config.PropertiesFactoryBean in project new-cloud by xie-summer.

the class QuartzConfigration method quartzProperties.

@Bean
public Properties quartzProperties() throws IOException {
    PropertiesFactoryBean propertiesFactoryBean = new PropertiesFactoryBean();
    propertiesFactoryBean.setLocation(new ClassPathResource(quartzConfig));
    propertiesFactoryBean.afterPropertiesSet();
    return propertiesFactoryBean.getObject();
}
Also used : PropertiesFactoryBean(org.springframework.beans.factory.config.PropertiesFactoryBean) ClassPathResource(org.springframework.core.io.ClassPathResource) PropertiesFactoryBean(org.springframework.beans.factory.config.PropertiesFactoryBean) Bean(org.springframework.context.annotation.Bean) SchedulerFactoryBean(org.springframework.scheduling.quartz.SchedulerFactoryBean)

Example 23 with PropertiesFactoryBean

use of org.springframework.beans.factory.config.PropertiesFactoryBean in project dq-easy-cloud by dq-open-cloud.

the class EcTaskSchedulerConfig method quartzProperties.

@Bean
public Properties quartzProperties() throws IOException {
    PropertiesFactoryBean propertiesFactoryBean = new PropertiesFactoryBean();
    propertiesFactoryBean.setLocation(new ClassPathResource("/quartz.properties"));
    propertiesFactoryBean.afterPropertiesSet();
    return propertiesFactoryBean.getObject();
}
Also used : PropertiesFactoryBean(org.springframework.beans.factory.config.PropertiesFactoryBean) ClassPathResource(org.springframework.core.io.ClassPathResource) PropertiesFactoryBean(org.springframework.beans.factory.config.PropertiesFactoryBean) Bean(org.springframework.context.annotation.Bean) SchedulerFactoryBean(org.springframework.scheduling.quartz.SchedulerFactoryBean)

Aggregations

PropertiesFactoryBean (org.springframework.beans.factory.config.PropertiesFactoryBean)23 ClassPathResource (org.springframework.core.io.ClassPathResource)21 Properties (java.util.Properties)12 Bean (org.springframework.context.annotation.Bean)11 ByteArrayInputStream (java.io.ByteArrayInputStream)6 XmlBeanDefinitionReader (org.springframework.beans.factory.xml.XmlBeanDefinitionReader)6 GenericApplicationContext (org.springframework.context.support.GenericApplicationContext)6 InputStreamResource (org.springframework.core.io.InputStreamResource)6 SchedulerFactoryBean (org.springframework.scheduling.quartz.SchedulerFactoryBean)6 Ignore (org.junit.Ignore)5 Test (org.junit.Test)5 TwitterTemplate (org.springframework.social.twitter.api.impl.TwitterTemplate)5 Message (org.springframework.messaging.Message)3 Tweet (org.springframework.social.twitter.api.Tweet)2 ArrayList (java.util.ArrayList)1 SimpleUrlValidatorFactoryBean (org.apereo.cas.web.SimpleUrlValidatorFactoryBean)1 FactoryBean (org.springframework.beans.factory.FactoryBean)1 DefaultResourceLoader (org.springframework.core.io.DefaultResourceLoader)1 Resource (org.springframework.core.io.Resource)1 JndiObjectFactoryBean (org.springframework.jndi.JndiObjectFactoryBean)1