GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - redis-developer/redis-starter-java: A starter project for working with Redis and Java

BranchesTags
Open more actions menu

Latest commit

 

History

10 Commits
10 Commits

Folders and files

NameName
Last commit message
Last commit date
.mvn/wrapper
.mvn/wrapper
 
 
src
src
 
 
.dockerignore
.dockerignore
 
 
.env.docker
.env.docker
 
 
.env.example
.env.example
 
 
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
README.md
README.md
 
 
compose.yml
compose.yml
 
 
manifest.yml
manifest.yml
 
 
mvnw
mvnw
 
 
mvnw.cmd
mvnw.cmd
 
 
pom.xml
pom.xml
 
 

Repository files navigation

This is a Redis starter template for Java and Spring Boot 4.

Requirements

  • Java 17+
  • Docker

The project uses the included Maven wrapper, so a separate Maven install is optional.

Environment

Copy the sample environment file:

cp .env.example .env

Supported variables:

  • REDIS_URL
  • PORT
  • LOG_LEVEL
  • LOG_STREAM_KEY
  • NODE_ENV

.env is optional at runtime. Spring will use real environment variables and command-line properties first, then fall back to .env values when present.

.env.docker contains compose-safe defaults for the bundled Redis service.

Run with Docker

docker compose up -d

This starts Redis 8 and the API server. The app is available at http://localhost:8080 unless PORT is overridden. Redis stays on the internal compose network by default, so it does not claim host port 6379.

Run locally

Point REDIS_URL at Redis Stack / Redis Cloud, then start the app with:

./mvnw spring-boot:run

API

  • GET /api/todos lists all todos
  • GET /api/todos/search?name=<name>&status=<status> searches by name and/or status
  • GET /api/todos/{id} fetches a single todo
  • POST /api/todos creates a todo from { "name": "Sample todo" }
  • PATCH /api/todos/{id} updates status from { "status": "todo|in progress|complete" }
  • DELETE /api/todos/{id} deletes a todo

Notes:

  • GET /api/todos/search is the primary search route.
  • Trailing-slash route aliases are still accepted for compatibility.
  • Error responses use { "status": <int>, "message": <string> }.
  • Todo timestamps are returned as createdDate and updatedDate.

Tests

Run the full test suite with:

./mvnw test

Tests use Testcontainers and start Redis automatically. You do not need a pre-running Redis server or a local .env file.

Redis Cloud

If you do not already have a database, start here:

  • https://redis.io/try-free/

Use the endpoint, username, and password from Redis Cloud to build a connection string such as:

REDIS_URL="redis://default:<password>@redis-#####.c###.us-west-2-#.ec2.redns.redis-cloud.com:#####"

Learn More

  • https://redis.io/docs/latest/
  • https://redis.io/learn/
  • https://redis.io/demo-center/

About

A starter project for working with Redis and Java

redis.io/docs/latest/develop/clients/jedis/

Topics

javajedisredisspringspring-bootstartertemplate

Resources

Readme
Activity
Custom properties

Stars

7 stars

Watchers

3 watching

Forks

3 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.