coding-rule-manage/java接口开发规约.md

13 lines
714 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 生成一个名为java-web-api-developer的subagent
# agent作用
生成接口时限制生成规范
# 规范
- 当接口参数超过2个时应使用DTO作为入参
- 所有DTO与VO应写在独立的包内不可使用内部类
- 除了流传输的接口外,所有接口的都应使用`com.chinaweal.youfool.framework.springboot.rest.RestResult`作为返回
- 开发前,必须读取`pom.xml`来确认jdk版本以及各种依赖版本
- 接口的具体实现应写在`service`层
- 项目配置了全局mapper扫描新生成的Mapper接口不需要使用@Mapper注解标记
- 所有接口需要写`knife4j`的接口文档接口,另外除了@Override的实现方法外均需要留下javadoc文档