CLAUDE.md@by-language/java claudeA
CLAUDE.md@by-language/java is agent-read markdown (claude) from overseastelegramaliterateperson865/awesome-claude-md.
Indexed from public GitHub and served as immutable, content-addressed versions. Install it pinned to an exact SHA-256 with the mdr CLI, and every file is verified against the hash recorded here before it reaches your agent. The deterministic audit below grades the latest version, and the same file always earns the same grade.
What the file says
# CLAUDE.md - Java Spring Boot 项目规范
## 构建与运行
- 构建工具:Maven(`mvn clean package -DskipTests`)或 Gradle(`./gradlew build`)
- 运行测试:`mvn test` 或 `./gradlew test`
- 本地启动:`mvn spring-boot:run -Dspring-boot.run.profiles=local`
- Java 版本:17+,使用 `records` 替代纯数据类
## 项目结构
- 按业务领域分包:`com.example.项目名.{domain}.{controller,service,repository,dto}`
- 避免按技术层全局分包(不要一个巨大的 `controller/` 包)
- 配置类集中在 `config/` 包,通用工具类放 `common/` 包
- `resources/` 下按 profile 管理配置:`application-{local,dev,prod}.yml`
## Spring Boot 规范
- Controller 层仅做参数校验和响应封装,业务逻辑写在 Service 层
- 使用 `@Validated` + JSR 380 注解做入参校验,禁止手动 if 判空
- 统一异常处理用 `@RestControllerAdvice`,返回标准错误响应体
- 配置属性用 `@ConfigurationProperties` 绑定,禁止散落的 `@Value`
- Bean 注入优先使用构造函数注入,禁止字段注入(`@Autowired` 在字段上)
## 数据访问层
- JPA 场景:Entity 类加 `@Entity`,Repository 继承 `JpaRepository`
- MyBatis 场景:Mapper XML 与接口同包名,SQL 保持简洁可读
- 复杂查询使用 QueryDSL 或 MyBatis 动态 SQL,禁止字符串拼接 SQL
- 数据库变更用 Flyway/Liquibase 管理,禁止手动改表结构
- 事务注解 `@Transactional` 加在 Service 方法上,标明 `rollbackFor = Exception.class`
## Lombok 策略
- 允许使用:`@Getter`、`@Builder`、`@RequiredArgsConstructor`、`@Slf4j`
- 禁止使用:`@Data`(隐式 `@Setter` 破坏不变性)、`@AllArgsConstructor`
- DTO 优先使用 Java `record`,仅在需要 Builder 模式时用 Lombok
## 测试规范
…Read the whole file at its exact version.
How to install
mdr add overseastelegramaliterateperson865/awesome-claude-md/by-language/java/CLAUDE.md@git:20260320.9b01acamdr add overseastelegramaliterateperson865/awesome-claude-md/by-language/java/CLAUDE.md@sha256:7ba3c0d671c0f924Pin to a label to follow the author's releases, or to a sha256 to freeze the exact bytes forever. Either way the resolved hash is written to mdr.lock, and mdr install reproduces it on any machine.
[](https://markdownregistry.com/a/art_4trwj6eayf577uex)
1 badge views in 30 days
Versions
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20260320.9b01aca latest | 2026-03-20 | 9b01aca | 2,925 B | A | view · diff |
| git:20260320.fcf2609 | 2026-03-20 | fcf2609 | 2,387 B | A | view |
Audit of the latest version
- pass: Size between 200 bytes and 200 KB (2925 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
overseastelegramaliterateperson865/awesome-claude-md · 3 stars · license MIT · pushed 2026-09-23 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_4trwj6eayf577uex GET https://markdownregistry.com/api/v1/resolve?ref=overseastelegramaliterateperson865/awesome-claude-md/by-language/java/CLAUDE.md GET https://markdownregistry.com/api/v1/blob/7ba3c0d671c0f92416b9fb4cfbe7ad83e3a5e4836dd93ad91181a3c3c3e42e59
Your agent does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
More from overseastelegramaliterateperson865/awesome-claude-md
Every file in overseastelegramaliterateperson865/awesome-claude-md