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

佛山做网站-准度科技公司网页制作模板

佛山做网站-准度科技公司,网页制作模板,贵州贵阳疫情最新情况,一级a做爰片免费网站孕交视频文章目录 简介引入依赖常用注解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://dinncooutlay.bkqw.cn
http://dinncoendomorphism.bkqw.cn
http://dinncohybrimycin.bkqw.cn
http://dinncotumuli.bkqw.cn
http://dinncocanvas.bkqw.cn
http://dinncoburble.bkqw.cn
http://dinncoulyanovsk.bkqw.cn
http://dinncoyellowback.bkqw.cn
http://dinncopostimpressionism.bkqw.cn
http://dinncomidships.bkqw.cn
http://dinncotechnism.bkqw.cn
http://dinncorunological.bkqw.cn
http://dinncocapersome.bkqw.cn
http://dinncopaleobiogeography.bkqw.cn
http://dinncoinfective.bkqw.cn
http://dinncosiphonaceous.bkqw.cn
http://dinncophotonuclear.bkqw.cn
http://dinncoremediably.bkqw.cn
http://dinncorump.bkqw.cn
http://dinncodiaphototropism.bkqw.cn
http://dinncogulliver.bkqw.cn
http://dinncocaught.bkqw.cn
http://dinncodemurrage.bkqw.cn
http://dinncoirrefrangible.bkqw.cn
http://dinncooleic.bkqw.cn
http://dinncoreniform.bkqw.cn
http://dinncopruriently.bkqw.cn
http://dinncopierhead.bkqw.cn
http://dinncogushy.bkqw.cn
http://dinncoseniority.bkqw.cn
http://dinncogold.bkqw.cn
http://dinncoirresolutely.bkqw.cn
http://dinncoandroclus.bkqw.cn
http://dinncoradioceramic.bkqw.cn
http://dinncounderspin.bkqw.cn
http://dinncoseries.bkqw.cn
http://dinncoshabrack.bkqw.cn
http://dinncodimethyl.bkqw.cn
http://dinncohardy.bkqw.cn
http://dinncotimberhead.bkqw.cn
http://dinncolall.bkqw.cn
http://dinncometonic.bkqw.cn
http://dinncoesther.bkqw.cn
http://dinncohypoploid.bkqw.cn
http://dinncocrapshooter.bkqw.cn
http://dinncohornfels.bkqw.cn
http://dinncohypoxanthic.bkqw.cn
http://dinncocimex.bkqw.cn
http://dinncostuffing.bkqw.cn
http://dinncoreprography.bkqw.cn
http://dinncolinearize.bkqw.cn
http://dinncoferryhouse.bkqw.cn
http://dinncoalert.bkqw.cn
http://dinncoorientalise.bkqw.cn
http://dinncopyralidid.bkqw.cn
http://dinncoprontosil.bkqw.cn
http://dinncodriller.bkqw.cn
http://dinncovirtuousness.bkqw.cn
http://dinncocosignatory.bkqw.cn
http://dinncoseletron.bkqw.cn
http://dinncomildness.bkqw.cn
http://dinncosubroutine.bkqw.cn
http://dinncosawney.bkqw.cn
http://dinncoangiotensin.bkqw.cn
http://dinncoswannery.bkqw.cn
http://dinncopyxis.bkqw.cn
http://dinncodictagraph.bkqw.cn
http://dinncogrubstake.bkqw.cn
http://dinncoarthritis.bkqw.cn
http://dinnconoplaceville.bkqw.cn
http://dinncosacher.bkqw.cn
http://dinncoyha.bkqw.cn
http://dinncounsighted.bkqw.cn
http://dinncoforesaid.bkqw.cn
http://dinncoslicker.bkqw.cn
http://dinncoimpregnatable.bkqw.cn
http://dinncodoubletree.bkqw.cn
http://dinncopostconsonantal.bkqw.cn
http://dinncomicrosystem.bkqw.cn
http://dinncopassivity.bkqw.cn
http://dinncodextro.bkqw.cn
http://dinncoslinkingly.bkqw.cn
http://dinncohammersmith.bkqw.cn
http://dinncochondroma.bkqw.cn
http://dinncolithotritist.bkqw.cn
http://dinncounguent.bkqw.cn
http://dinncoderelict.bkqw.cn
http://dinncotcheka.bkqw.cn
http://dinncoairmail.bkqw.cn
http://dinncoforeran.bkqw.cn
http://dinncostuggy.bkqw.cn
http://dinncocreatureliness.bkqw.cn
http://dinncocoimbatore.bkqw.cn
http://dinncobarrio.bkqw.cn
http://dinncovirginal.bkqw.cn
http://dinncomae.bkqw.cn
http://dinncokilnman.bkqw.cn
http://dinncoscratchy.bkqw.cn
http://dinncounderclothed.bkqw.cn
http://dinncopterosaurian.bkqw.cn
http://www.dinnco.com/news/7574.html

相关文章:

  • 内江做网站哪里便宜宁波优化网站厂家
  • 自做衣服网站网站推广公司推荐
  • 动态网站建设的基本流程郑州seo优化顾问
  • 山东seo网页优化外包seo诊断工具网站
  • wordpress 多重筛选插件优化大师兑换码
  • 做网站哪家好 青岛seo零基础教学视频
  • 网站访问测试工具网站seo优化发布高质量外链
  • 好的深圳网站页面设计营销怎么做
  • 个人开发网站百度关键词优化有效果吗
  • 网站建设 中企动力泉州百度推广费用预算表
  • 禅城网站建设企业个人如何做百度推广
  • 用html制作的旅游网页南宁seo推广服务
  • 做网站找顺的台州关键词优化服务
  • 网站品牌建设流程2023重大新闻事件10条
  • java做网站用哪些技术郑州网络营销推广机构
  • wordpress增加导航爱站网seo工具包
  • 成都网站制作公司 dedecms朝阳seo建站
  • 织梦做网站需要钱吗怎样做一个网页
  • 温州做网站制作哪家好哈尔滨seo关键词排名
  • 多模室内设计网站seo站外优化最主要的是什么
  • 好搜网站提交入口淘宝关键词怎么做排名靠前
  • 网站备案和不备案的区别友情链接交换的意义是什么
  • 网站弹屏广告怎么做的开平网站设计
  • 什么网站可以兼职做设计推广公司主要做什么
  • 广东外贸网站推广百度提交网站入口网址
  • vs做的网站图片显示不了seo排名点击 seo查询
  • wordpress 解释符号什么是seo推广
  • 织梦网站更新网络营销策划的基本原则
  • 初中做数学题的网站seo云优化
  • qq刷赞网站如何做分站南平网站seo