Skip to content

环境部署

aifuqiang02 edited this page Mar 31, 2023 · 7 revisions

环境部署

准备工作

<!-- https://mvnrepository.com/artifact/com.tx06/apidoc.clients -->
<dependency>
    <groupId>com.tx06</groupId>
    <artifactId>apidoc.clients</artifactId>
    <version>1.0.9</version>
</dependency>  
  • application.yml增加必要配置
  tx06:
    server:
      run: false #默认linux系统下为false , windows系统下为true
      uuid: 9d43d986-0922-41c4-9d46-d5b1a3547983  #项目uuid , 在https://a.tx06.com/系统中创建
      dictSql: SELECT dict_label,dict_value,dict_type FROM `sys_dict_data`  #字典sql
  • 所有Controller 类增加注解 @RestController("xxx") ,其中xxx将解析为接口目录

  • 所有Controller 里的方法,增加注解 @RequestMapping(value="/接口路径",name="接口名称")

  • 数据库所有字段增加备注,关联字典,则在备注后增加"|dict_type",如:用户状态|user_status

并在设计数据库字段的时候,尽量不要出现重复字段。比如sys_user表和sys_role表都有status 这个字段, 那么最好命名为user_status 和role_status

  • 接口写完后,启动项目,将自动生成api文档
Clone this wiki locally