Today to do spring Boot/gradle/redis related projects, encountered a number of issues, recorded as follows:
Spring Boot Org.springframework.session.data.redis.RedisFlushMode
This error is connected to the Redis server problem, to see if the Redis server IP written in application.properties is wrong, correct, or Redis server enabled Protected-mode, Use the command when running Redis:
Nohup redis-server--protected-mode No & turn off Protected-mode when Redis is started;
may also use the wrong package, carefully look at the official network of the respective Redis server version of the package, the Redis server used here is 3.2.6, the corresponding jar package is used
Compile ' Org.springframework.boot:spring-boot-starter-redis '//compile ' org.springframework.session: Spring-session:1.0.1.release ' compile group: ' Org.springframework.session ', Name: ' Spring-session ', version: ' 1.3.0. RELEASE '
How to set JVM parameters in Gradle by creating a new file Gradle.properties, setting JVM parameters within the file
Org.gradle.jvmargs=-xmx2048m-xx:maxpermsize=512m-xx:+heapdumponoutofmemoryerror-dfile.encoding=utf-8
Only one parameter is set here: Org.gradle.jvmargs=-dspring.profiles.active=redis
Error encountered while booting on server gradle Test executor 1 ' finished with Non-zero exit value 137
Exceptions that are typically encountered on the server end up with this information, but if you only report this exception, it may be because the server is running low on memory, causing the startup to fail.
Installation of Redis
git clone-b 3.2 https://github.com/antirez/redis.git; This command will download the latest 3.2 version of the source to the local Redis folder
CD Redis
Make;make Install; The official recommendation is to execute the make test,make test times with 2 errors and check them without causing the installation to fail and install them forcibly.
Nohup redis-server--protected-mode No &;
REDIS-CLI shutdown
The default installed directory is located at:/usr/local/bin/
If you want to use a configuration file,
Redis-server/path/to/redis.conf General installation is a configuration file that places Redis within the/etc/redis/folder.
Do not use the Windows version of the Redis,redis version of Windows compared to Linux, the version number lag is very serious.
This hint may be because the version number is too low: ERR unsupported CONFIG parameter:notify-keyspace-events, which causes some of spring's tags to not be recognized.
This article from "Dream do not know is a guest" blog, reproduced please contact the author!
Spring Boot,gradle,redis