Files
Springboot4-Vue3_Demo/README.md
T
2026-04-04 08:40:13 +08:00

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
  1. Go to backend directory
cd backend
  1. Configure application properties

Crate src/main/resources/application.yml or edit src/main/resources/application-example.yml to set your own configurations.

  1. Load Database

Import src/main/resources/springboot_vue3.sql

default database user:

username: test password: 123456

(the password saved in SQL needs to be obtained through the test class)

  1. Grade build
gradle build

jar directory: build/libs/backend-(ver).jar

  1. Run the backend server
java -jar build/libs/backend-(ver).jar
Frontend Setup
  1. Go to frontend directory
cd frontend
  1. prepare some picture

you need a frontend/src/assets/welcome-image.png, which is the background of welcome page.

  1. 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:

  1. Install Nginx if you don't have it.

    download Nginx

  2. Copy the contents of the dist directory to your Nginx html directory.

  3. Configure Nginx to serve the frontend and proxy API requests to the backend server.

  4. Restart Nginx.

sudo systemctl restart nginx