Redisbank is a simple, real-time mobile banking application built using Java/Spring Boot - an open source, microservice-based Java web framework. This application has a capability to show a searchable transaction overview with realtime updates as well as a personal finance management overview with realtime balance and biggest spenders updates.
- Java
- Spring Boot
- Bootstrap
- CSS
- Vue
The application uses the below Redis core-data structure and Modules:
- Redis Streams for the realtime transactions
- Redis Time Series for the balance over time
- Redis Search for searching transactions
- Sorted Sets for the 'biggest spenders'
- Redis hashes for session storage (via Spring Session)
git clone https://github.com/redis-developer/redisbank/
docker run -p 6379:6379 redislabs/redismod:latest
./mvnw clean package spring-boot:run
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ redisbank ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to /Users/ajeetraina/projects/redisbank/target/test-classes
[INFO]
[INFO] <<< spring-boot-maven-plugin:2.4.5:run (default-cli) < test-compile @ redisbank <<<
[INFO]
[INFO]
[INFO] --- spring-boot-maven-plugin:2.4.5:run (default-cli) @ redisbank ---
[INFO] Attaching agents: []
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.4.5)
Navigate to http://localhost:8080 and login with user lars and password larsje
- Follow the steps from 'Running locally'
- Make sure you are logged into the Azure CLI
- Add the Azure Spring Cloud extension to the Azure CLI
az extension add --name spring-cloudIf you already have the extension, make sure it's up to date usingaz extension update --name spring-cloud - Create an Azure Spring Cloud instance using
az spring-cloud create -n acrebank -g rdsLroACRE -l northeurope(this may take a few minutes) - Create an App in the newly created Azure Spring Cloud instance using
az spring-cloud app create -n acrebankapp -s acrebank -g rdsLroACRE --assign-endpoint true --runtime-version Java_11 - Modify the application.properties so it points to your newly created ACRE instance
spring.redis.host=your ACRE hostname
spring.redis.port=your ACRE port (default: 10000)
spring.redis.password= your ACRE access key
- Modify the application.properties so the websocket config will point to the Azure Spring Cloud app instance endpoint createed in step 3.
stomp.host=your ASC app endpoint URL (Default: <appname>-<service-name>.azuremicroservices.io)
stomp.port=443
stomp.protocol=wss
- Rebuild the app using
./mvnw package - Deploy the app to Azure Spring Cloud using
az spring-cloud app deploy -n acrebankapp -s acrebank -g rdsLroAcre --jar-path target/redisbank-0.0.1-SNAPSHOT.jar
To get the application logs:
az spring-cloud app logs -n acrebankapp -g rdsLroAcre -s acrebank
Note: project is compiled with JDK11 as that's currently the max LTS version that's supported by Azure Spring Cloud. Project will run fine when running locally or on other platforms up to JDK16.
- Thread safety. Data is currently generated off of a single stream of transactions, which means it's the same for all users. Not a problem with the current iteration because it's single user, but beware when expanding this to multi-user.
- Hardcoded values. Code uses hardcoded values throughout the code, these need to be replaced with proper variables.


