List of usage examples for java.util Properties setProperty
public synchronized Object setProperty(String key, String value)
From source file:sample.ServerConfig.java
@Bean Properties gemfireProperties() { // <2> Properties gemfireProperties = new Properties(); gemfireProperties.setProperty("name", "GemFireClientServerHttpSessionSample"); gemfireProperties.setProperty("mcast-port", "0"); gemfireProperties.setProperty("log-level", logLevel()); gemfireProperties.setProperty("jmx-manager", "true"); gemfireProperties.setProperty("jmx-manager-start", "true"); return gemfireProperties; }
From source file:ask.springboot.conf.MyBatisMapperScannerConfig.java
@Bean public MapperScannerConfigurer mapperScannerConfigurer() { MapperScannerConfigurer mapperScannerConfigurer = new MapperScannerConfigurer(); mapperScannerConfigurer.setSqlSessionFactoryBeanName("sqlSessionFactory"); mapperScannerConfigurer.setBasePackage("ask.springboot.mapper"); Properties properties = new Properties(); properties.setProperty("mappers", "ask.springboot.util.MyMapper"); properties.setProperty("notEmpty", "false"); properties.setProperty("IDENTITY", "MYSQL"); mapperScannerConfigurer.setProperties(properties); return mapperScannerConfigurer; }
From source file:org.axiom_tools.data.BasicDataSource.java
public Properties additionalProperties() { Properties properties = new Properties(); properties.setProperty(HibernateDialect, databaseDialect); if (!codeGeneration.isEmpty()) { properties.setProperty(HibernateCodeDDL, codeGeneration); }/*from w w w . j a v a2s . com*/ return properties; }
From source file:io.confluent.kafkarest.AvroConsumerState.java
public AvroConsumerState(KafkaRestConfig config, ConsumerInstanceId instanceId, ConsumerConnector consumer) { super(config, instanceId, consumer); Properties props = new Properties(); props.setProperty("schema.registry.url", config.getString(KafkaRestConfig.SCHEMA_REGISTRY_URL_CONFIG)); decoder = new KafkaAvroDecoder(new VerifiableProperties(props)); }
From source file:gov.uscis.vis.api.config.SwaggerPropertiesLoader.java
private Properties createSwaggerProperties(ConfigurableEnvironment env) { Properties properties = new Properties(); properties.setProperty("swagger.title", "Jira Metrics API"); properties.setProperty("swagger.description", "Jira Metrics API Documentation"); properties.setProperty("swagger.version", env.getProperty("info.build.version")); properties.setProperty("swagger.base-path", "/jira-metrics-api"); properties.setProperty("swagger.pretty-print", "true"); properties.setProperty("swagger.scan", "true"); properties.setProperty("swagger.contact", ""); properties.setProperty("swagger.license", ""); properties.setProperty("swagger.licenseUrl", ""); // Packages that should be added as resources visible in swagger List<String> packagesToAdd = new ArrayList<>(); packagesToAdd.add("gov.uscis.vis.api"); // packagesToAdd.add("gov.uscis.visapi.common.batch.resource"); // Add scan packages properties.setProperty("swagger.resourcePackage", StringUtils.join(packagesToAdd, ",")); return properties; }
From source file:org.spring.data.gemfire.app.main.SpringGemFireClient.java
@Bean Properties gemfireProperties(@Value("${gemfire.log.level:config}") String logLevel) { Properties gemfireProperties = new Properties(); gemfireProperties.setProperty("name", SpringGemFireClient.class.getSimpleName()); gemfireProperties.setProperty("log-level", logLevel); return gemfireProperties; }
From source file:com.vgorcinschi.concordiafootballmanager.data.DataConfig.java
@Bean public LocalSessionFactoryBean sessionFactory(DataSource dataSource) { LocalSessionFactoryBean sfb = new LocalSessionFactoryBean(); sfb.setDataSource(dataSource);/* ww w . j a v a 2 s . c o m*/ sfb.setPackagesToScan(new String[] { "com.vgorcinschi.concordiafootballmanager.model", "com.vgorcinschi.concordiafootballmanager.model.players" }); Properties props = new Properties(); props.setProperty("dialect", "org.hibernate.dialect.H2Dialect"); sfb.setHibernateProperties(props); return sfb; }
From source file:cn.vlabs.duckling.vwb.ui.rsi.profile.SiteLanguageService.java
public Object setLanguage(RestSession session, Object message) throws ServiceException { LanguageRequest request = (LanguageRequest) message; VWBContainer container = VWBContainerImpl.findContainer(); Properties properteis = new Properties(); properteis.setProperty(KeyConstants.SITE_LANGUAGE, request.getLanguage()); container.getSiteConfig().setProperty(request.getSiteId(), properteis); return null;/* w ww. j ava 2 s . c o m*/ }
From source file:com.temenos.useragent.generic.context.BaseConnectionConfig.java
private Properties getBaseConnectionProperties() { Properties baseConnprops = new Properties(); baseConnprops.setProperty(ConnectionConfig.ENDPOINT_URI, "http://localhost:9089/t24interactiontests-iris/t24interactiontests.svc"); baseConnprops.setProperty(ConnectionConfig.SERVICE_ROOT, "GB0010001"); baseConnprops.setProperty(ConnectionConfig.USER_NAME, "INPUTT"); baseConnprops.setProperty(ConnectionConfig.PASS_WORD, Base64.decodeBase64("MTIzNDU2").toString()); return baseConnprops; }
From source file:com.clicktravel.infrastructure.mail.aws.AmazonMailSender.java
public void init() { final Properties props = getJavaMailProperties(); props.setProperty(MAIL_TRANSPORT_PROTOCOL_KEY, "aws"); props.setProperty(AWSJavaMailTransport.AWS_ACCESS_KEY_PROPERTY, awsCredentials.getAWSAccessKeyId()); props.setProperty(AWSJavaMailTransport.AWS_SECRET_KEY_PROPERTY, awsCredentials.getAWSSecretKey()); // set port to -1 to ensure that Spring calls the equivalent of "transport.connect()" setPort(-1);// ww w.ja va 2 s . c o m }