当前位置: 首页 > news >正文

禹州做网站的营销是什么意思

禹州做网站的,营销是什么意思,网站一般用什么免费字体,云南做网站公司【Spring连载】使用Spring Data访问Redis&#xff08;一&#xff09;----快速指南 一、导入依赖二、Hello World程序 一、导入依赖 在pom.xml文件加入如下依赖就可以下载到spring data redis的jar包了&#xff1a; <dependency><groupId>org.springframework.boot…

【Spring连载】使用Spring Data访问Redis(一)----快速指南

  • 一、导入依赖
  • 二、Hello World程序

一、导入依赖

在pom.xml文件加入如下依赖就可以下载到spring data redis的jar包了:

		<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-data-redis</artifactId></dependency><dependency><groupId>redis.clients</groupId><artifactId>jedis</artifactId></dependency>

二、Hello World程序

首先,你需要设置一个正在运行的Redis服务器。Spring Data Redis 需要Redis 2.6或更高版本,并且Spring Data Redis集成了Lettuce和Jedis这两个流行的开源Java库。现在,你可以创建一个简单的Java应用程序,用于向Redis存储和读取值。创建要运行的主应用程序,示例如下:

public class RedisApplication {private static final Log LOG = LogFactory.getLog(RedisApplication.class);public JedisConnectionFactory jedisConnectionFactory() {RedisStandaloneConfiguration redisStandaloneConfiguration =new RedisStandaloneConfiguration();redisStandaloneConfiguration.setHostName("localhost");redisStandaloneConfiguration.setDatabase(0);redisStandaloneConfiguration.setPassword(RedisPassword.of("123456"));redisStandaloneConfiguration.setPort(6379);return new JedisConnectionFactory(redisStandaloneConfiguration);}public static void main(String[] args) {JedisConnectionFactory connectionFactory = new RedisApplication().jedisConnectionFactory();connectionFactory.afterPropertiesSet();RedisTemplate<String, String> template = new RedisTemplate<>();template.setConnectionFactory(connectionFactory);template.setDefaultSerializer(StringRedisSerializer.UTF_8);template.afterPropertiesSet();template.opsForValue().set("foo", "bar");LOG.info("Value at foo:" + template.opsForValue().get("foo"));connectionFactory.destroy();}
}

即使在这个简单的示例中,也有一些值得注意的事情需要指出:

  • 你可以使用RedisConnectionFactory创建RedisTemplate的实例(或ReactiveRedisTemplate,用于响应式使用)。连接工厂是在支持的驱动程序之上的抽象。
  • 没有单一的方法来使用Redis,因为它支持广泛的数据结构,如plain keys(“strings”),lists, sets, sorted sets, streams, hashes等等。
http://www.ds6.com.cn/news/25234.html

相关文章:

  • 男人和女人做羞羞的事情网站网站排名seo
  • wordpress是动态网站吗下载优化大师app
  • 网站右下角代码关键词排名优化官网
  • 网站空间域名续费站长之家查询的网址
  • wordpress表单提交邮件通知个人如何优化网站有哪些方法
  • 吃什么补肾最好搜索关键词排名优化
  • 网站开发时如何设计英文版本搜索引擎营销的实现方法有
  • 党建设网站长沙有实力seo优化公司
  • seo是怎么优化上去苏州优化seo
  • 网站层级关系佛山网站优化排名推广
  • 外综服网站开发长春seo排名收费
  • 网站载入页面怎么做外贸seo公司
  • 福州网站建设的公司哪家好网页模版
  • 做单页购物网站用什么好如何通过网络营销自己
  • 网站怎么做移动图片不显示不出来企业文化标语
  • 许昌做网站公司企业宣传推广方案
  • php做视频网站有哪些软件下载亚马逊关键词工具哪个最准
  • 访问网站出来的是目录seo和网络推广有什么区别
  • 南京网站设计平台把百度网址大全设为首页
  • 建设银行手机官方网站下载安装百度搜索量查询
  • 查找网站开发者网络营销外包推广价格
  • 深圳做网站乐云seo费用优惠全网营销公司
  • 做黄色网站被抓了怎么处理b2b外贸接单平台
  • jsp网站连接数据库百度非企推广开户
  • 银川app购物网站制作公司软文代写公司
  • 怎么用ip做网站如何自己创建一个网站
  • 网站建设的软件平台seo网站优化知识
  • 银川兴庆建设局网站南宁seo外包靠谱吗
  • 北京网站设计引流微信hyhyk1seo顾问服务 乐云践新专家
  • 网站 做购物车新网站应该怎么做seo