本篇文章為大家展示了使用SpringBoot2.X怎么對(duì)Redis框架進(jìn)行整合,內(nèi)容簡(jiǎn)明扼要并且容易理解,絕對(duì)能使你眼前一亮,通過(guò)這篇文章的詳細(xì)介紹希望你能有所收獲。
一、使用Spring Initializr創(chuàng)建項(xiàng)目web項(xiàng)目
1、File→New→Project
2、點(diǎn)擊Next如圖所示,命名好Group和Artifact
3、Next后如圖所示,勾選中需要的依賴,Spring Initializr會(huì)自動(dòng)導(dǎo)入所需的starter
4、創(chuàng)建項(xiàng)目成功后,pom.xml文件中的依賴如下
<?xml version="1.0" encoding="UTF-8"?>4.0.0 org.springframework.boot spring-boot-starter-parent 2.2.2.RELEASE com.heny spring-boot-redis 0.0.1-SNAPSHOT spring-boot-redis Demo project for Spring Boot 1.8 org.springframework.boot spring-boot-starter-web org.mybatis.spring.boot mybatis-spring-boot-starter 2.1.1 mysql mysql-connector-java runtime org.springframework.boot spring-boot-starter-test test org.junit.vintage junit-vintage-engine org.springframework.boot spring-boot-maven-plugin