This micro-service allows to generate otp and send the otp as otp and email
- Spring boot 2.2.1
- Open JDK 11
- Redis 5.0.7
- Maven 3.6 (only to run maven commands)
wget http://download.redis.io/releases/redis-5.0.7.tar.gz
tar xzf redis-5.0.7.tar.gz
cd redis-5.0.7
make
- Adding password protecting
- Go to
- Edit redis.conf, uncomment requirepass
eg: requirepass yourpassword
Goto redis installation directory and cd src
./redis-server ../redis.conf
##Using the Redis-Cli To view the data in redis cache we can you the redis-cli tool
- Go to redis installation directory
- cd /src
- run ./redis-cli
- Authenticate by typing
AUTH your password
##Using Redis commands
- In the redis cli you can type redis commands
- To get keys
keys *
- Get value of a key
get keyName
- View ttl
ttl keyName
Refer [https://redis.io/commands]
##Configuring the micro-service
- Add the password to redis server in /src/main/resources/application.properties
All dependencies are available in pom.xml.
mvn clean compile package
java -jar target/otp-service-0.0.1-SNAPSHOT.jar
mvn test
For further reference, please consider the following sections:
Copyright (c) Tokoin - This source code is licensed under the license.