- 需求分析
- 设计(软件开发人员)
- 编码(软件开发人员完成)
- 测试
- 上线运维
角色分工
- 项目经理
- 产品经理(项目前期介入)
- UI设计师
- 架构师(架构设计,技术选型)
- 开法工程师
- 测试工程师
- 运维工程师
软件环境
- 开发环境(development)
- 测试环境(testing)
- 生产环境(production)
2.项目介绍
- 第一期主要实现基本需求
- 第二期针对移动端进行改进(微信小程序)
- 第三期进行系统进行优化升级
技术选型产品原型:产品经理提供,一般是一些HTML页面,展示项目的功能。让开发人员对产品有一个更直观的了解。
- 用户层: Html5,Vue.js,ElementUI,微信小程序
- 网关层: Nginx
- 应用层: SpringBoot2 SpringSession Swagger
- 数据层: MySQL MybatisPlus Redis
- 工具:git maven junit
- 移动端前台
手机号登录 微信登录 地址管理 历史订单 菜品管理 购物车 下单 菜品管理
- 系统后台管理
分类管理 菜品管理 ...角色
- 后台系统管理员:登录后台管理系统,拥有最高权限
- 后台系统普通员工
- C端用户
- pom文件
4.0.0 org.springframework.boot spring-boot-starter-parent 2.4.5 com.wcj springBoot-reggie_take_out 1.0-SNAPSHOT 17 org.springframework.boot spring-boot-starter org.springframework.boot spring-boot-starter-test test org.springframework.boot spring-boot-starter-web compile com.baomidou mybatis-plus-boot-starter 3.5.1 org.projectlombok lombok 1.18.24 com.alibaba fastjson 2.0.7 commons-lang commons-lang 2.6 mysql mysql-connector-java runtime com.alibaba druid-spring-boot-starter 1.1.23 org.springframework.boot spring-boot-maven-plugin 2.4.5
- application.yaml
server:
port: 8080
spring:
application:
#应用的名称(可选)
name: springBoot-reggie_take_out
datasource:
druid:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/reggie?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
username: root
password: root
mybatis-plus:
configuration:
#在映射实体或者属性时,将数据库中表名和字段名中的下划线去掉,按照驼峰命名法映射
#user_name--->userName
map-underscore-to-camel-case: true
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
global-config:
db-config:
id-type: ASSIGN_ID
- 编写启动类
package com.wcj.reggie;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@Slf4j
@SpringBootApplication
public class ReggieApplication {
public static void main(String[] args) {
SpringApplication.run(ReggieApplication.class);
}
}
- 导入前端资源
springBoot建议将静态资源放在static或者templates文件夹下
解决方法:新建一个config包,在里面编写一个静态资源映射的配置类,告诉SpringMVC静态资源的路径
package com.wcj.reggie.config;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
@Slf4j
@Configuration
public class WebMvcConfig extends WebMvcConfigurationSupport {
@Override
//设置静态资源映射
protected void addResourceHandlers(ResourceHandlerRegistry registry) {
log.info("开始进行静态资源映射...");
registry.addResourceHandler("/backend/**").addResourceLocations("classpath:/backend/");
registry.addResourceHandler("/front/**").addResourceLocations("classpath:/front/");
}
}
现在启动项目,输入正确的URL就可以访问到静态资源了!
(记录学习的过程,如有不对的地方,请各位大佬多多指教!)



