Giter VIP home page Giter VIP logo

fashionai's Introduction

fashionAI

时尚平台后端

首先介绍src目录结构

├─main
│  ├─java
│  │  └─ices
│  │      └─fashion
│  │          ├─config		//配置文件夹
│  │          ├─controller	//控制层,与前端请求对应
│  │          ├─entity		//实体类层,存放与数据库表格一一对应的实体类
│  │          ├─mapper		//dao层,用于和数据库数据进行操作
│  │          ├─service		//服务层,主要业务逻辑集中在这一层
│  │          │  ├─dto		//dto即封装数据传输类,通常为返回给前端的数据
│  │          │  └─impl		//服务层接口的实现
│  │          └─util		//存放各种编写的工具类
│  └─resources
└─test
    └─java
        └─ices
            └─fashion		//可以在这里写接口测试

代码执行流程

  1. conroller层接收到对应的前端请求

  2. 编写代码将controller层调用service的方法进行处理

  3. service处理过程中如果涉及操作数据库,则调用mapper里面提供的方法

  4. mapper操作数据库得到原始数据库数据

  5. service层得到数据封装前端需要的数据对应的dto

  6. service将结果返回给调用它的方法的controller层,controller层对请求进行应答

详细例子可以看TestController

关于mapper层使用了mybatis-plus,使用方式参考官方文档https://baomidou.com/

整个项目基于springboot搭建,使用方式参考官方文档https://spring.io/projects/spring-boot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.