Skip to content
Back to skills

Springboot

ASecurity

- 分层架构:Controller→Service→Mapper/Repository,每层只依赖下一层 - 注解:@RestController处理请求、@Service业务逻辑、@Mapper数据访问、@Configuration配置类 - 依赖注入:优先构造器注入(不用@Autowired字段注入),便于测试 - 配置文件:application.yml分环境(dev/test/prod),敏感信息用环境变量${DB_PASSWORD} - AOP切面:@Aspect+@Around做日志/权限/耗时统计,切点表达式精确匹配 - 异常处理:@ControllerAdvice+@ExceptionHandler全局捕获,返回统一错误格式 - Starter自动配置:@ConditionalOnClass/OnProperty控制Bean加载条件 - Mapper接口对应XML:接口在java目录,XML在resources/mapper/,namespace全限定名匹配 - 事务:@Transactional加在Service方法上,只读查询加readOnly=true - 启动类

  • 687 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added June 5, 2026
databasesjavaspring

Security analysis

A100/100

Scanned June 5, 2026

npx -y skills add val1813/kwcode --skill springboot --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Springboot?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Springboot
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/val1813-springboot/badge)](https://www.skillsdirectory.com/skills/val1813-springboot)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: SpringBootExpert
version: 1.0.0
trigger_keywords: [springboot, spring, spring boot, 注解, autowired, bean]
trigger_min_confidence: 0.7
pipeline: [locator, generator, verifier]
lifecycle: mature
---

## 领域知识

- 分层架构:Controller→Service→Mapper/Repository,每层只依赖下一层
- 注解:@RestController处理请求、@Service业务逻辑、@Mapper数据访问、@Configuration配置类
- 依赖注入:优先构造器注入(不用@Autowired字段注入),便于测试
- 配置文件:application.yml分环境(dev/test/prod),敏感信息用环境变量${DB_PASSWORD}
- AOP切面:@Aspect+@Around做日志/权限/耗时统计,切点表达式精确匹配
- 异常处理:@ControllerAdvice+@ExceptionHandler全局捕获,返回统一错误格式
- Starter自动配置:@ConditionalOnClass/OnProperty控制Bean加载条件
- Mapper接口对应XML:接口在java目录,XML在resources/mapper/,namespace全限定名匹配
- 事务:@Transactional加在Service方法上,只读查询加readOnly=true
- 启动类:@SpringBootApplication放在根包下,确保组件扫描覆盖所有子包

## 经验规则(自动生成)

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…