Add rate-limiting mechanism with AOP for API endpoints

Introduced a rate-limiting feature using Spring AOP and a custom `RateLimit` annotation. Includes `InMemoryRateLimiterService`, `RateLimitAspect`, and related classes for controlling request limits. Applied rate limiting to specific API controllers to enhance system stability and prevent abuse.
This commit is contained in:
2025-04-17 20:31:14 +02:00
parent a3570b6833
commit e3eaab708c
8 changed files with 212 additions and 2 deletions
+7
View File
@@ -35,6 +35,13 @@ dependencies {
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
implementation("org.springframework.boot:spring-boot-configuration-processor")
implementation("org.springframework.boot:spring-boot-starter-hateoas")
//AOP
implementation("org.aspectj:aspectjrt:1.9.19")
implementation("org.aspectj:aspectjweaver:1.9.19")
implementation("org.springframework:spring-aop")
implementation("org.springframework:spring-aspects")
}
tasks.withType<Test> {