Springboot配置多个redis的方法示例-创新互联
Spring Data提供其他项目,用来帮你使用各种各样的NoSQL技术,包括MongoDB, Neo4J, Elasticsearch, Solr, Redis,Gemfire, Couchbase和Cassandra。Spring Boot为Redis, MongoDB, Elasticsearch, Solr和Gemfire提供自动配置。你可以充分利用其他项目,但你需要自己配置它们。
单个 RedisTemplate 的配置
使用 spring-boot-starter-data-redis 配置一个 redis 是很简单的。
pom.xml 中该引入的依赖是要引入的,下面的是完整的 pom.xml
<?xml version="1.0" encoding="UTF-8"?>4.0.0 me.deweixu muti-redis 0.0.1-SNAPSHOT jar muti-redis config mutiple redis host org.springframework.boot spring-boot-starter-parent 2.0.4.RELEASE UTF-8 UTF-8 1.8 org.springframework.boot spring-boot-starter-data-redis org.springframework.boot spring-boot-starter-test test org.springframework.boot spring-boot-maven-plugin
网页题目:Springboot配置多个redis的方法示例-创新互联
网页URL:http://pcwzsj.com/article/dhopcg.html