1.下载javahttps://www.oracle.com/java/technologies/downloads/#java8改环境变量2.安装mysql8.0https://dev.mysql.com/downloads/installer/记得安装地址 安装到 C:\Program Files\MySQL\MySQL Server8.0‘’配置环境变量找到pathmysql-u root-p3.创建数据库和表自己的数据库创建的代码4.启动后端java-jar quiz-backend.jar5.启动前端下载nginx启动前端https://nginx.org/en/download.html打开C:\nginx\conf\nginx.conf找到server部分修改为server{listen80;server_name localhost;# 前端静态文件location /{root C:\quiz-system\frontend;index index.html;try_files$uri$uri/ /index.html;}# API反向代理到后端location /api{proxy_pass http://127.0.0.1:8080;proxy_set_header Host$host;proxy_set_header X-Real-IP$remote_addr;}}启动nginxcdC:\nginx start nginx直接用源码启动前端npminstallnpmrun dev改vite.config文件内容,添加允许的hostimport{defineConfig}fromviteimportvuefromvitejs/plugin-vueexportdefaultdefineConfig({plugins:[vue()],server:{host:0.0.0.0,port:3000,allowedHosts:[域名网址,localhost,127.0.0.1],proxy:{/api:{target:http://127.0.0.1:8080,changeOrigin:true}}}})7.打开网址1.解析域名2.放通防火墙规则端口填写前端的端口