110 lines
3.0 KiB
Markdown
110 lines
3.0 KiB
Markdown
# Java API Project Setup Task
|
|
|
|
## Purpose
|
|
|
|
Initialize a new Java REST API project using Java 21, Spring Boot Web, Maven, and AWS cloud platform. Creates the foundation for a modern REST API with proper project structure, dependencies, and configuration.
|
|
|
|
## When to Use
|
|
|
|
- Starting a new Java REST API project
|
|
- Creating a REST API with Spring Boot Web
|
|
- Setting up a project for AWS API Gateway integration
|
|
- Establishing a foundation for API development with modern Java
|
|
|
|
## Input Requirements
|
|
|
|
- API project name and description
|
|
- API endpoints specification
|
|
- Authentication requirements
|
|
- Database requirements
|
|
- AWS deployment preferences
|
|
- Documentation requirements
|
|
|
|
## Process Steps
|
|
|
|
### 1. Project Structure Creation
|
|
|
|
- Create Maven project structure
|
|
- Set up source directories (src/main/java, src/main/resources)
|
|
- Set up test directories (src/test/java, src/test/resources)
|
|
- Create package structure following REST API conventions
|
|
- Initialize Git repository
|
|
|
|
### 2. Maven Configuration
|
|
|
|
- Create pom.xml with Java 21 configuration
|
|
- Add Spring Boot parent POM
|
|
- Configure Maven compiler plugin
|
|
- Add Spring Boot Maven plugin
|
|
- Add OpenAPI/Swagger dependencies
|
|
- Configure build profiles (dev, test, prod)
|
|
- Set up Maven wrapper
|
|
|
|
### 3. Spring Boot Configuration
|
|
|
|
- Add Spring Boot Web starter dependency
|
|
- Add Spring Boot Data JPA starter dependency
|
|
- Add Spring Boot Security starter dependency
|
|
- Add Spring Boot Test starter dependency
|
|
- Add Spring Boot Actuator starter dependency
|
|
- Add OpenAPI/Swagger dependencies
|
|
- Configure application.properties/yml
|
|
|
|
### 4. API Configuration
|
|
|
|
- Create main application class
|
|
- Configure Spring MVC for REST
|
|
- Set up OpenAPI/Swagger documentation
|
|
- Configure CORS if needed
|
|
- Set up error handling for REST APIs
|
|
- Configure content negotiation
|
|
- Set up validation
|
|
|
|
### 5. Development Environment Setup
|
|
|
|
- Configure IDE for Java 21 and Spring Boot
|
|
- Set up local development database
|
|
- Configure application profiles
|
|
- Set up API testing tools (Postman, Insomnia)
|
|
- Configure debugging environment
|
|
- Set up API documentation access
|
|
|
|
## Output Deliverables
|
|
|
|
- Complete Maven project structure
|
|
- Configured pom.xml with all dependencies
|
|
- Spring Boot REST API configuration
|
|
- OpenAPI/Swagger documentation setup
|
|
- Development environment setup guide
|
|
- Basic REST API template
|
|
- Git repository with initial commit
|
|
|
|
## Success Criteria
|
|
|
|
- Maven project builds successfully
|
|
- Spring Boot application starts without errors
|
|
- OpenAPI/Swagger documentation accessible
|
|
- Basic REST endpoints working
|
|
- Development environment fully functional
|
|
- All dependencies resolved correctly
|
|
- Project ready for API development
|
|
|
|
## Dependencies
|
|
|
|
- Java 21 JDK installed
|
|
- Maven 3.9+ installed
|
|
- IDE configured for Java development
|
|
- Git repository access
|
|
- AWS account (for deployment)
|
|
|
|
## Tools and Resources
|
|
|
|
- Maven build tool
|
|
- Spring Boot framework
|
|
- OpenAPI/Swagger
|
|
- Java 21 JDK
|
|
- IDE (IntelliJ IDEA, Eclipse, VS Code)
|
|
- Git version control
|
|
- API testing tools
|
|
- AWS CLI (for deployment)
|