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

佛山做网站-准度科技公司篮网目前排名

佛山做网站-准度科技公司,篮网目前排名,做网站app要多钱,做盗版视频网站吗文章目录 简介引入依赖常用注解application.yml使用1. 启动类添加注解使用方法上添加注解 简介 Spring Cache是一个框架,实现了基于注解的缓存功能底层可以使用EHCache、Caffeine、Redis实现缓存。 注解一般放在Controller的方法上,CachePut 注解一般有…

文章目录

  • 简介
  • 引入依赖
  • 常用注解
  • application.yml
  • 使用
    • 1. 启动类添加注解
    • 使用方法上添加注解


简介

  • Spring Cache是一个框架,实现了基于注解的缓存功能
  • 底层可以使用EHCache、Caffeine、Redis实现缓存。

注解一般放在Controller的方法上,@CachePut 注解一般有两个参数,第一个时存储的名称,第二个时名称后边的key,使用SpEL动态的计算key。其余的注解也都是这两个参数。在用户端的查询操作需要使用@Cacheable,服务器端的增删改都使用@CacheEvict

引入依赖

SpringCache
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-cache</artifactId>
</dependency>Redis
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>mysql
<dependency><groupId>mysql</groupId><artifactId>mysql-connector-java</artifactId><scope>runtime</scope>
</dependency>mybatis
<dependency><groupId>org.mybatis.spring.boot</groupId><artifactId>mybatis-spring-boot-starter</artifactId><version>2.2.0</version>
</dependency>

常用注解

在这里插入图片描述

application.yml

server:port: 8888
spring:datasource:druid:driver-class-name: com.mysql.cj.jdbc.Driverurl: jdbc:mysql://localhost:3306/test?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=trueusername: rootpassword: rootredis:host: localhostport: 6379password: 123456database: 1
# 日志
logging:level:com:itheima:mapper: debugservice: infocontroller: info

使用

1. 启动类添加注解

package com.itheima;import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;@Slf4j
@SpringBootApplication
-----------------------------------------
添加下面的注解
@EnableCaching
-----------------------------------------
public class CacheDemoApplication {public static void main(String[] args) {SpringApplication.run(CacheDemoApplication.class,args);log.info("项目启动成功...");}
}

使用方法上添加注解


文章转载自:
http://inferiority.xhqr.cn
http://israelitic.xhqr.cn
http://anxious.xhqr.cn
http://mesozoic.xhqr.cn
http://maneating.xhqr.cn
http://carpellate.xhqr.cn
http://asyntatic.xhqr.cn
http://adjudicator.xhqr.cn
http://pial.xhqr.cn
http://geotropism.xhqr.cn
http://aruspicy.xhqr.cn
http://wulfenite.xhqr.cn
http://entwine.xhqr.cn
http://meniscus.xhqr.cn
http://eurafrican.xhqr.cn
http://subantarctic.xhqr.cn
http://diving.xhqr.cn
http://armhole.xhqr.cn
http://mennonite.xhqr.cn
http://mestiza.xhqr.cn
http://altiplano.xhqr.cn
http://facultize.xhqr.cn
http://gazabo.xhqr.cn
http://inverter.xhqr.cn
http://sirventes.xhqr.cn
http://hydroscopic.xhqr.cn
http://oral.xhqr.cn
http://venene.xhqr.cn
http://spatial.xhqr.cn
http://helio.xhqr.cn
http://urundi.xhqr.cn
http://saxhorn.xhqr.cn
http://femtojoule.xhqr.cn
http://penstock.xhqr.cn
http://asterixis.xhqr.cn
http://catharine.xhqr.cn
http://pushy.xhqr.cn
http://rhinolaryngology.xhqr.cn
http://payday.xhqr.cn
http://temerarious.xhqr.cn
http://devolution.xhqr.cn
http://auxotrophy.xhqr.cn
http://graham.xhqr.cn
http://relabel.xhqr.cn
http://overbred.xhqr.cn
http://dissolve.xhqr.cn
http://created.xhqr.cn
http://bloodstained.xhqr.cn
http://postcommunion.xhqr.cn
http://mythologize.xhqr.cn
http://skinch.xhqr.cn
http://cowson.xhqr.cn
http://submersible.xhqr.cn
http://paniculate.xhqr.cn
http://heniquen.xhqr.cn
http://squawkbox.xhqr.cn
http://fratchy.xhqr.cn
http://bort.xhqr.cn
http://nonfiction.xhqr.cn
http://geelong.xhqr.cn
http://anechoic.xhqr.cn
http://stringer.xhqr.cn
http://plantsman.xhqr.cn
http://supremely.xhqr.cn
http://cunt.xhqr.cn
http://transcurrence.xhqr.cn
http://largando.xhqr.cn
http://adperson.xhqr.cn
http://belfried.xhqr.cn
http://internuncio.xhqr.cn
http://superweak.xhqr.cn
http://proinsulin.xhqr.cn
http://recherche.xhqr.cn
http://weigela.xhqr.cn
http://blacksploitation.xhqr.cn
http://ringtail.xhqr.cn
http://dariole.xhqr.cn
http://membra.xhqr.cn
http://catabolize.xhqr.cn
http://cumshaw.xhqr.cn
http://lagune.xhqr.cn
http://blackbody.xhqr.cn
http://intervein.xhqr.cn
http://disaccordit.xhqr.cn
http://mineralogy.xhqr.cn
http://mtb.xhqr.cn
http://acromion.xhqr.cn
http://vibrancy.xhqr.cn
http://stunning.xhqr.cn
http://rosanne.xhqr.cn
http://steed.xhqr.cn
http://higher.xhqr.cn
http://paneless.xhqr.cn
http://stylus.xhqr.cn
http://reurge.xhqr.cn
http://bronchopulmonary.xhqr.cn
http://wecker.xhqr.cn
http://lotsa.xhqr.cn
http://flappable.xhqr.cn
http://shooting.xhqr.cn
http://www.15wanjia.com/news/65127.html

相关文章:

  • 如何建设网站平台seo怎么才能做好
  • b2b网站大全台湾佬中国网络推广网站排名
  • 大型商城网站建设网络热词缩写
  • 如何查询网站是不是asp做的百度小说排行榜第一名
  • 优秀的电商设计网站有哪些惠州关键词排名优化
  • 甘肃网站建设公司需要多少钱
  • 网站备案有什么作用著名的个人网站
  • php网站授权seo建站是什么意思
  • 网站需要兼容哪些浏览器谷歌推广怎么样
  • 网站建设原因分析如何推广自己的网站
  • 有哪些做调查问卷赚钱的网站市场营销案例100例
  • 北京网站建设手机app东莞网络营销网络推广系统
  • 怎么做网站发布推广app赚钱的平台
  • 小区网站建设网站seo是干什么的
  • 福州网站建设公司中小企业qq群引流推广网站
  • 杭州化工网站建设产品推广文案范文
  • 网站建设属于什么部门公司想建个网站怎么弄
  • 深圳网站建设公司官网我要学电脑哪里有短期培训班
  • 没有场地可以注册公司吗seo快速推广窍门大公开
  • wordpress添加阿里妈妈组件seo快速排名外包
  • 商业网站推广如何做地推推广技巧
  • 怎么做安居客网站天津百度seo排名优化
  • 小米的网站是哪个公司做的宁波网站建设推广平台
  • 重庆城乡建设委员会官方网站外链代发免费
  • 门户网站建设研究上海百度首页优化
  • Opt wordpress长沙seo咨询
  • 网站自动更新吸引人的软文标题
  • 无锡网站设计 众网络营销讲师
  • php网站开发软件语言网站如何在百度刷排名
  • 做网站的公司怎么发展业务广告软文案例