- 必须使用 @Entity 注解实体类。
- 必须使用 @Data (来自 Lombok) 注解实体类,除非在提示中另有说明。
- 必须使用 @Id 和 @GeneratedValue(strategy=GenerationType.IDENTITY) 注解实体 ID。
- 必须对关系使用 FetchType.LAZY,除非在提示中另有说明。
- 根据最佳实践正确注解实体属性,例如 @Size, @NotEmpty, @Email 等。
Springboot Jpa Entity Class Conventions
为实体类设计设定标准,包括用于数据库交互的注解、ID 生成策略和关系配置。
Springboot Jpa Entity Class Conventions by liaosw97 · 7e066d8
npx skillmds@latest add liaosw97/springboot-jpa-entity-class-conventions File contents
---name: springboot-jpa-entity-class-conventionsdescription: 为实体类设计设定标准,包括用于数据库交互的注解、ID 生成策略和关系配置。---- 必须使用 @Entity 注解实体类。- 必须使用 @Data (来自 Lombok) 注解实体类,除非在提示中另有说明。- 必须使用 @Id 和 @GeneratedValue(strategy=GenerationType.IDENTITY) 注解实体 ID。- 必须对关系使用 FetchType.LAZY,除非在提示中另有说明。- 根据最佳实践正确注解实体属性,例如 @Size, @NotEmpty, @Email 等。
liaosw97/awesome-rules-skills/tree/main/plugins/springboot/skills/springboot-jpa-entity-class-conventions commit 7e066d895f
Frequently asked questions
Run npx skillmds@latest add liaosw97/springboot-jpa-entity-class-conventions in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
为实体类设计设定标准,包括用于数据库交互的注解、ID 生成策略和关系配置。 It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Capability flags: docs only. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
liaosw97 (@liaosw97) published this skill. Their other Agent Skills are listed on their SkillMD profile.