企业应用开发环境

开发工具

  • idea工具
  • 创建项目(Spring Boot)
  • 构建工具 maven
  • JDK:1.8
  • Spring Boot\Druid\MySQL\MyBatis Plus

应用接口测试

  • 浏览器
  • postman

服务接口编码规模

  • 接口参数校验
  • 异常处理,自定义异常封装异常信息
  • 异常信息封装为json对象
  • 约定:errcode(2001:xxxx, 0), data, errmsg
  • 接口服务说明文档

接口服务说明文档

  1. 请求方式:GET/POST(HTTP/HTTPS)

  2. 接口功能说明:功能描述

  3. 请求地址:/user/getuserlist

  4. 请求参数说明:

    表格

    编号 参数名 是否必须 参数说明

  1. 返回结果

    包含所有可能结果

  2. 结果参数说明

    表格

    编号 字段名 字段说明

企业应用打包

  • Spring Boot,maven
  • 打包前clean
  • 执行package
  • jar

企业应用jar包运行

  • 上传服务器

  • 服务器有Java运行环境

  • 执行jar包

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    nohup java -jar letao-0.0.1-SNAPSHOT.jar &

    tail -f nohup.out

    Warn: Could not find @TableId in Class: cn.com.chinahitech.letao.user.entity.User.
    Parsed mapper file: 'URL [jar:file:/home/hadoop/letao/letao-0.0.1-SNAPSHOT.jar!/BOOT-INF/classes!/mapper/user/UserMapper.xml]'
    _ _ |_ _ _|_. ___ _ | _
    | | |\/|_)(_| | |_\ |_)||_|_\
    / |
    3.3.0
    17:30:40.964 [main] INFO o.s.s.c.ThreadPoolTaskExecutor -Initializing ExecutorService 'applicationTaskExecutor'
    17:30:41.683 [main] INFO o.a.coyote.http11.Http11NioProtocol -Starting ProtocolHandler ["http-nio-8081"]
    17:30:41.834 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer -Tomcat started on port(s): 8081 (http) with context path ''
    17:30:41.874 [main] INFO c.c.c.letao.LetaoApplication -Started LetaoApplication in 8.79 seconds (JVM running for 10.111)

Git服务器提交内容

  • Java/Python程序源代码
  • 文档(readme.md)/ 作业 / excel
  • 不要提交:class/jar/….
作者

江风引雨

发布于

2020-07-22

更新于

2023-01-10

许可协议

CC BY 4.0

评论