步骤
1.拉取代吗
git clone https://github.com/newbee-ltd/newbee-mall.git
2.导入sql
创建据库:
newbee_mall_db
,并将newbee-mall\src\main\resources\newbee_mall_schema.sql
文件导入到数据库中,数据库名可自行修改
3.打开项目
- 检查
src/main/resources/application.properties
中的配置,比如数据库ip、端口等是否正确 - 查看上传文件存放路径:
ltd.newbee.mall.common.Constants#FILE_UPLOAD_DIC
(此路径可以修改),将压缩包文件src/main/resources/upload.zip
解压到你配置的路径下面,不然项目启动找不到图片,需注意的是upload.zip压缩文件已经包含了upload目录,解压的时候就不要出现多级upload,错误示例:e:\upload\upload
4.启动项目
访问地址:http://localhost:28089,首页用户:13711113333/13811113333/13911113333,密码:shisan
网页端 | 地址 | 用户名 | 密码 |
---|---|---|---|
商城首页 | http://localhost:28089 | 13700002703 | 123456 |
管理后台 | http://localhost:28089/admin | admin/newbee-admin1/newbee-admin2 | 123456 |
QA
1.若项目添加了项目名如:server.servlet.context-path=/mall
,后台请求404
答:原因是因为后台没有添加项目路径,需要添加项目路径,如: 将src="/admin/dist/img/img-upload.png"
替换为th:src="@{/admin/dist/img/img-upload.png}"
,主要影响页面为:src/main/resources/templates/admin
路径下的页面