1.9 KiB
Springboot4-Vue3
Long may the Student Pack
English / 简体中文
Tech Stack
Backend
- Kotlin with Gradle.kts
- Spring Security
- Spring Mail
- Mybatis Plus
- JWT
- MySQL
- Redis
- RabbitMQ
Frontend
- Vue3 with Vite and TypeScript
- vue-router
- axios
- element-plus
Project Setup
General Requirements
- JDK 25+
- Kotlin 2.3.20+
- Node.js 16+
- MySQL 8+
- Redis 6+
- RabbitMQ 3.8+
Git clone
git clone https://github.com/SOR2171/Springboot4-Vue3_Demo.git
cd Springboot4-Vue3_Demo
Backend Setup
- Go to backend directory
cd backend
- Configure application properties
Crate src/main/resources/application.yml
or edit src/main/resources/application-example.yml
to set your own configurations.
- Load Database
Import src/main/resources/springboot_vue3.sql
default database user:
username:
testpassword:123456(the password saved in SQL needs to be obtained through the test class)
- Grade build
gradle build
jar directory: build/libs/backend-(ver).jar
- Run the backend server
java -jar build/libs/backend-(ver).jar
Frontend Setup
- Go to frontend directory
cd frontend
- prepare some picture
you need a frontend/src/assets/welcome-image.png, which is the background of welcome page.
- Build
npm install
npm run build
The build files will be generated in dist directory.
Nginx Setup (Optional)
If you want to serve the frontend with Nginx, you can follow these steps:
-
Install Nginx if you don't have it.
-
Copy the contents of the
distdirectory to your Nginxhtmldirectory. -
Configure Nginx to serve the frontend and proxy API requests to the backend server.
-
Restart Nginx.
sudo systemctl restart nginx