Skip to content

Reference project for mid-size Spring Boot applications; using Postgres, JPA, and Spring Modulith.

License

Notifications You must be signed in to change notification settings

experimental-software/spring-adventures

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Adventures

Reference project for mid-size Spring Boot applications

Technology stack

Dependencies

  • Maven
  • Docker

Development

AdventureWorks database

The project builds upon the "AdventureWorks" database from NorfolkDataSci/adventure-works-postgres.

docker compose up -d 
cd /path/to/adventure-works-postgres/

export PGPASSWORD=test

psql -h 0.0.0.0 -p 5432 -U test -c 'CREATE DATABASE "Adventureworks";'
psql -h 0.0.0.0 -p 5432 -U test -d Adventureworks < install.sql

Start application

mvn spring-boot:run -Dspring-boot.run.profiles=dev

http://localhost:8080/swagger-ui/index.html

Testing

Component testing

mvn verify

System testing

docker compose up -d
docker run \
  --env SPRING_DATASOURCE_URL="jdbc:postgresql://database:5432/Adventureworks" \
  --rm \
  -p "8000:8080" \
  --network spring-adventures_default \
  experimentalsoftware/spring-adventures:backend-latest
curl -s http://localhost:8000/api/product-inventories

Maintenance

Update Docker image

mvn spring-boot:build-image

docker tag docker.io/library/spring-adventures:0.0.1-SNAPSHOT experimentalsoftware/spring-adventures:backend-latest
docker push experimentalsoftware/spring-adventures:backend-latest

Alternatives

Credits

About

Reference project for mid-size Spring Boot applications; using Postgres, JPA, and Spring Modulith.

Resources

License

Contributing

Stars

Watchers

Forks

Languages