Install any skill in seconds. Free to start, no credit card required.
Get Started Free →xu-xiang/springboot-patterns
Spring Boot 架构模式、REST API 设计、分层服务、数据访问、缓存、异步处理和日志记录。适用于 Java Spring Boot 后端开发。
Passed 20 of 24 test cases with the skill, and 18 of 24 without it.
2 fixed18 passed either way4 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 2 test cases the skill fixed. Same model, same prompt, with and without the skill.
Can you write a Spring Boot HTTP filter class that enforces per-client request rate limits using Bucket4j? Please ensure it safely handles client IP resolution when deployed behind reverse proxies and returns an appropriate status code when the limit is exceeded.
| Checked | Without skill | With skill |
|---|---|---|
| Obtains client IP via request.getRemoteAddr() without reading headers directly. | Missed | Passed |
| Sets response status to HttpStatus.TOO_MANY_REQUESTS when limit is exceeded. | Passed | Passed |
The instructions your model reads when the skill loads.
为构建可扩展的生产级服务提供的 Spring Boot 架构与 API 模式。
@RestController
@RequestMapping("/api/markets")
@Validated
class MarketController {
private final MarketService marketService;
MarketController(MarketService marketService) {
this.marketService = marketService;
}
@GetMapping
ResponseEntity<Page<MarketResponse>> list(
@RequestParam(defaultValue = "0") int page,
@RequestParam(defaultValue = "20") int size) {
Page<Market> markets = marketService.list(PageRequest.of(page, size));
return ResponseEntity.ok(markets.map(MarketResponse::from));
}
@PostMapping
ResponseEntity<MarketResponse> create(@Valid @RequestBody CreateMarketRequest request) {
Market market = marketService.create(request);
return ResponseEntity.status(HttpStatus.CREATED).body(MarketResponse::from(market));
}
}
public interface MarketRepository extends JpaRepository<MarketEntity, Long> {
@Query("select m from MarketEntity m where m.status = :status order by m.volume desc")
List<MarketEntity> findActive(@Param("status") MarketStatus status, Pageable pageable);
}
test cases passed, vs 18 / 24 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.