This is a Spring Boot application built with Maven, designed to run on AWS Elastic Beanstalk. It is configured to use Java 17 (Corretto) and supports automatic deployment via GitHub Actions.
Ensure the following are installed on your system:
- Java 17 (OpenJDK or Corretto 17)
- Maven (for building and running the app)
- AWS CLI (for AWS Elastic Beanstalk management)
- EB CLI (for managing Beanstalk environments)
- cURL (for API testing)
git clone https://github.com/ArthuR1CP/python-flask-ga.git
cd your-repo-namemvn clean packageBy default, the application runs on port 5000:
mvn spring-boot:runcurl -X POST http://localhost:5000/users -H "Content-Type: application/json" -d '{"name": "Artur Cepuc", "email": "arturcepuc@gmail.com"}'curl -X GET http://localhost:5000/userscurl -X GET http://localhost:5000/users/1curl -X DELETE http://localhost:5000/users/1Once deployed, replace your-app-name with your AWS Elastic Beanstalk app URL:
curl http://your-app-name.eu-west-3.elasticbeanstalk.com/usersGo to GitHub → Your Repo → Settings → Secrets → Actions, then add:
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEY
Pushing to the main branch triggers GitHub Actions to deploy the app:
git add .
git commit -m "Deploy app to AWS Elastic Beanstalk"
git push origin mainCheck GitHub → Actions for the deployment status.
- ✅ Run Locally:
mvn spring-boot:run& test withcurl - ✅ AWS Deployment: GitHub Actions deploys the app automatically.
- ✅ Test API: Use
curlto interact with the API locally or on AWS.
🚀 Now you're ready to build, test, and deploy your Spring Boot app! 🎉