Add redis config
parent
80e42fee2d
commit
a5592cf054
|
@ -74,7 +74,7 @@ java config版本
|
|||
3. 创建MySQL数据库(默认数据库名oauth2_boot), 并运行相应的SQL脚本(脚本文件位于others/database目录),
|
||||
运行脚本的顺序: <code>initial_db.ddl -> oauth.ddl -> initial_data.ddl</code>
|
||||
|
||||
4. 修改application.properties(位于src/main/resources目录)中的数据库连接信息(包括username, password等)
|
||||
4. 修改application.properties(位于src/main/resources目录)中的数据库连接信息(包括username, password等),redis连接信息(包括host, port, password等)
|
||||
|
||||
5. 将本地项目导入到IDE(如Intellij IDEA)中, 可直接运行<code>SpringOauthServerApplication.java</code>进行访问;或配置Tomcat(或类似的servlet运行服务器), 并启动Tomcat(默认端口为8080);
|
||||
也可通过maven package命令将项目编译为jar文件(spring-oauth-server.jar),
|
||||
|
|
8
pom.xml
8
pom.xml
|
@ -61,10 +61,10 @@
|
|||
|
||||
|
||||
<!--Redis-->
|
||||
<!--<dependency>-->
|
||||
<!--<groupId>org.springframework.boot</groupId>-->
|
||||
<!--<artifactId>spring-boot-starter-data-redis</artifactId>-->
|
||||
<!--</dependency>-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
|
|
|
@ -24,12 +24,11 @@ spring.security.oauth2.authorizationserver.issuer=http://127.0.0.1:${server.port
|
|||
#
|
||||
# Redis
|
||||
#
|
||||
#spring.redis.host=localhost
|
||||
#spring.redis.port=6379
|
||||
#spring.redis.database=0
|
||||
#spring.redis.password=
|
||||
#spring.redis.timeout=2000
|
||||
#spring.redis.ssl=false
|
||||
spring.data.redis.host=localhost
|
||||
spring.data.redis.port=6379
|
||||
spring.data.redis.database=5
|
||||
spring.data.redis.password=
|
||||
spring.data.redis.timeout=2000
|
||||
#
|
||||
# Condition Config
|
||||
# @since 2.1.0
|
||||
|
|
Loading…
Reference in New Issue