Translation between Spring Boot and FastAPI

TaskSpring BootFastAPI
Generate project structure
Define API routes@RequestMappingAPIRouter
Deal with database (ORM & Querying)HibernateSQLAlchemy
Entity to Data Transfer Object (DTO)ModelMapperPydantic.BaseModel
(with orm_mode = True)
Database MigrationLiquibase, FlywayAlembic
Dependency ManagementMaven / GraddlePip
HTTP Request InterceptorAspectJ, ServletFilterDepends, Middleware
Built-in AuthenticationSpring
Read Environment file @Value(“${key}”)
Files .properties
File .env
OpenAPIspringdoc-openapiIt has a built-in module. Access at localhost:8000/docs

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s