Springboot Security
Java Spring Boot 服务中认证/授权、验证、CSRF、密钥、标头、速率限制和依赖安全性的 Spring Security 最佳实践。
Install
/plugin marketplace add xu-xiang/everything-claude-code-zhThe repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.
npx skills add xu-xiang/everything-claude-code-zh --skill springboot-securitygit clone --depth 1 https://github.com/xu-xiang/everything-claude-code-zh.git /tmp/everything-claude-code-zh
mkdir -p ~/.claude/skills
cp -r /tmp/everything-claude-code-zh/docs/zh-CN/skills/springboot-security ~/.claude/skills/springboot-securityPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Spring Boot 安全审查
在添加身份验证、处理输入、创建端点或处理密钥时使用。
## 何时激活
* 添加身份验证(JWT、OAuth2、基于会话)
* 实现授权(@PreAuthorize、基于角色的访问控制)
* 验证用户输入(Bean Validation、自定义验证器)
* 配置 CORS、CSRF 或安全标头
* 管理密钥(Vault、环境变量)
* 添加速率限制或暴力破解防护
* 扫描依赖项以查找 CVE
## 身份验证
* 优先使用无状态 JWT 或带有撤销列表的不透明令牌
* 对于会话,使用 `httpOnly`、`Secure`、`SameSite=Strict` cookie
* 使用 `OncePerRequestFilter` 或资源服务器验证令牌
```java
@Component
public class JwtAuthFilter extends OncePerRequestFilter {
private final JwtService jwtService;
public JwtAuthFilter(JwtService jwtService) {
this.jwtService = jwtService;
}
@Override
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response,
FilterChain chain) throws ServletException, IOException {
String header = request.getHeader(HttpHeaders.AUTHORIZATION);
if (header != null && header.startsWith("Bearer ")) {
String token = header.substring(7);
Authentication auth = jwtService.authenticate(token);
SecurityContextHolder.getContext().setAuthentication(auth);
}
chain.doFilter(request, response);
}
}
```
## 授权
* 启用方法安全:`@EnableMethodSecurity`
* 使用 `@PreAuthorize("hasRole('ADMIN')")` 或 `@PreAuthorize("@authz.canEdit(#id)")`
* 默认拒绝;仅公开必需的 scopeDetails
- Skill name
springboot-security- Repository
- xu-xiang/everything-claude-code-zh
- Path
docs/zh-CN/skills/springboot-security/SKILL.md- License
- MIT
- Repo updated
- 5 March 2026
FAQ
What does the Springboot Security skill do?
Java Spring Boot 服务中认证/授权、验证、CSRF、密钥、标头、速率限制和依赖安全性的 Spring Security 最佳实践。
How do I install the Springboot Security skill?
Claude Code plugin: /plugin marketplace add xu-xiang/everything-claude-code-zh. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Springboot Security popular?
It lives in xu-xiang/everything-claude-code-zh, which has 2,037 GitHub stars and 332 forks.
Related skills
Backend Patterns
2kxu-xiang/everything-claude-code-zh
Backend architecture patterns, API design, database optimization, and server-side best practices for Node.js, Express, and Next.js API routes.
Coding Standards
2kxu-xiang/everything-claude-code-zh
Universal coding standards, best practices, and patterns for TypeScript, JavaScript, React, and Node.js development.
Frontend Patterns
2kxu-xiang/everything-claude-code-zh
Frontend development patterns for React, Next.js, state management, performance optimization, and UI best practices.
Springboot Security
2kxu-xiang/everything-claude-code-zh
Spring Boot 服务的身份验证/授权、校验、CSRF、机密管理、响应头、速率限制及依赖安全的 Spring Security 最佳实践。
Springboot Security
2kxu-xiang/everything-claude-code-zh
Spring Boot 服务的 Spring Security 身份验证/授权、验证、CSRF、密钥、响应头、速率限制和依赖项安全最佳实践。
Dependency Management Deps Audit
2krmyndharis/antigravity-skills
Audit project dependencies for known vulnerabilities, licensing issues, outdated packages, and supply chain risk, and provide actionable remediation strategies. Use when reviewing or hardening the dependencies of a project.
Browse the most popular Claude skills, all security skills, or write your own with the skills generator.