Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/jabrena/cursor-rules-spring-boot/302-frameworks-spring-boot-restgit clone --depth 1 https://github.com/jabrena/cursor-rules-spring-bootWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/jabrena/cursor-rules-spring-boot/302-frameworks-spring-boot-rest)<a href="https://agentmods.dev/rules/jabrena/cursor-rules-spring-boot/302-frameworks-spring-boot-rest"><img src="https://agentmods.dev/badge/rules/jabrena/cursor-rules-spring-boot/302-frameworks-spring-boot-rest.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.06495 |
| Opus 5 | $0.00000 | $0.03247 |
| Sonnet 5 | $0.00000 | $0.01299 |
| Haiku 4.5 | $0.00000 | $0.00649 |
Grade A, and why
302-frameworks-spring-boot-rest scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 766 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Java REST API Design Principles
This comprehensive guide provides essential principles for designing robust, maintainable, and secure REST APIs using Spring Boot. These rules ensure your APIs follow industry best practices, maintain consistency, and provide excellent developer experience for API consumers.
Implementing These Principles
These guidelines are built upon the following core principles:
- Semantic Consistency: Use HTTP methods, status codes, and URI patterns according to their intended semantics
- Clear Communication: Provide unambiguous API contracts through proper DTOs, error handling, and documentation
- Security by Design: Implement authentication, authorization, and input validation from the start
- Evolutionary Design: Version APIs and structure them to support future changes without breaking existing clients
Table of contents
- Rule 1: Use HTTP Methods Correctly
- Rule 2: Design Clear and Consistent Resource URIs
- Rule 3: Use HTTP Status Codes Appropriately
- Rule 4: Implement Effective Request and Response Payloads (DTOs)
- Rule 5: Version Your APIs
- Rule 6: Handle Errors Gracefully
- Rule 7: Secure Your APIs
- Rule 8: Document Your APIs
- Rule 9: Use Controller Advice for Global Exception Handling
- Rule 10: Implement Problem Details for Error Responses
Rule 1: Use HTTP Methods Correctly
Title: Employ HTTP Methods Semantically
Description: Use HTTP methods according to their defined semantics to ensure predictability and compliance with web standards. GET for retrieval, POST for creation, PUT for update/replace, PATCH for partial update, and DELETE for removal.
Good example:
// Using Spring MVC annotations for illustration
@RestController
@RequestMapping("/users")
public class UserController {
@GetMapping("/{id}") // GET for retrieving a user
public ResponseEntity<UserDTO> getUser(@PathVariable String id) {
// ... logic to fetch user ...
return ResponseEntity.ok(new UserDTO());
}
@PostMapping // POST for creating a new user
public ResponseEntity<UserDTO> createUser(@RequestBody UserCreateDTO userCreateDTO) {
// ... logic to create user ...
UserDTO newUser = new UserDTO(); // Assume it gets an ID after creation
return ResponseEntity.created(URI.create("/users/" + newUser.getId())).body(newUser);
}
@PutMapping("/{id}") // PUT for replacing/updating a user
public ResponseEntity<UserDTO> updateUser(@PathVariable String id, @RequestBody UserUpdateDTO userUpdateDTO) {
// ... logic to update user ...
return ResponseEntity.ok(new UserDTO());
}
@DeleteMapping("/{id}") // DELETE for removing a user
public ResponseEntity<Void> deleteUser(@PathVariable String id) {
// ... logic to delete user ...
return ResponseEntity.noContent().build();
}
@PatchMapping("/{id}") // PATCH for partial updates
public ResponseEntity<UserDTO> partiallyUpdateUser(@PathVariable String id, @RequestBody Map<String, Object> updates) {
// ... logic to partially update user ...
return ResponseEntity.ok(new UserDTO());
}
}
// Dummy DTO classes
class UserDTO { private String id; public String getId() { return id; } /* ... other fields, getters, setters ... */ }
class UserCreateDTO { /* ... fields ... */ }
class UserUpdateDTO { /* ... fields ... */ }
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 766 lines · 0 tokens per session scan A 15cb121d081e
302-frameworks-spring-boot-rest is a cursor rule published in the GitHub repository jabrena/cursor-rules-spring-boot (47 stars, last pushed 5mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 6,495 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
java-import-fqn
Java 禁止不必要的全限定类名,必须 import(类名冲突除外).
component-parameter-key-no-dot
@ComponentParameter 的 key 禁止包含 ".",统一使用下划线 / 顶层扁平命名.
com-example-compliance-GdprService
AI rules for com.example.compliance.GdprService.
com-example-service-PublicPaymentController
AI rules for com.example.service.PublicPaymentController.
java-springboot-jpa-cursorrules-prompt-file
description: "Cursor rules for Java development with Springboot and JPA integration." globs: / alwaysApply: false.
java-springboot-standards
Java Spring Boot coding standards and patterns for your monorepo services.