Skip to content
billchen198318Public

About

一個簡單的 springboot 後端, 與 Vue 前端的範例. A simple Admin WEB, based on Java with springboot backend with Vue frontend example.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Repository files navigation

qífū-4

一個簡單的 springboot 後端, 與 Nuxt 3 (Vue) 前端的範例. A simple Admin WEB, based on Java with springboot backend, and Nuxt 3 frontend example.


📚 系統文件 (Documentation)

本專案已根據功能與層次拆分為多份詳細手冊,請點擊連結查看詳細內容:


🛠️ 安裝與初始化 (Installation)

1. 數據庫匯入 (MariaDB Import)


mariadb import

mysql> create database qifu4;

cd backend/doc
mysql qifu4 -u root -p < qifu4.sql


database connection config file modify , backend/app/src/main/resources/db1-config.properties

db1.datasource.jdbcUrl=jdbc:mariadb://localhost/qifu4?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
db1.datasource.username=mariadb-account
db1.datasource.password=mariadb-password

The database password can also be stored as a Jasypt ENC(...) value. Use backend/app/src/test/java/org/qifu/test/DatabasePasswordJasyptTest.java to generate it:

  1. In testEncryptAndDecryptDatabasePassword(), change rawPassword to the actual database password.
  2. Change encryptorPassword to the Jasypt key used by the application. For a local environment using the default configuration, use qifu4-dev-jasypt-key.
  3. Set a breakpoint after encryptedPropertyValue is assigned, then run the method as a JUnit test in Debug mode.
  4. Copy encryptedPropertyValue from the Eclipse Variables view into backend/app/src/main/resources/db1-config.properties:
db1.datasource.password=ENC(...)

Alternatively, generate the encrypted password directly with the Jasypt 1.9.3 CLI. Put jasypt-1.9.3.jar in the current directory, then run the following command in PowerShell and replace the database password and Jasypt key as needed:

java -cp "jasypt-1.9.3.jar" `
  org.jasypt.intf.cli.JasyptPBEStringEncryptionCLI `
  input="mariadb-password" `
  password="qifu4-dev-jasypt-key" `
  algorithm="PBEWithMD5AndDES" `
  ivGeneratorClassName="org.jasypt.iv.NoIvGenerator" `
  verbose=false

The CLI prints only the encrypted value. Wrap the output with ENC(...) before putting it in db1-config.properties:

db1.datasource.password=ENC(the-encrypted-value-printed-by-the-cli)

The encryptorPassword value must exactly match JASYPT_ENCRYPTOR_PASSWORD. If that environment variable is not set, the local default in application.properties is qifu4-dev-jasypt-key. Production should set its own JASYPT_ENCRYPTOR_PASSWORD and generate the ENC(...) value with the same key. Otherwise, application startup will fail while binding db1.datasource.password.

2. 後端開發環境

請使用 Eclipse 或 IntelliJ IDEA 匯入 backend/app、backend/base 與 backend/core 模組。

3. 前端開發環境

cd frontend-v-nx
npm install
npm run dev
  • Node.js 版本: 18+
  • 詳細說明: 詳見 前端開發手冊。
  • 登入測試帳號密碼: admin / admin99。

🚀 生產環境部署參考 (Production Deployment Reference)

本專案提供基於 K3s 高可用架構的部署參考(包含 VIP 192.168.10.200、Traefik Ingress 等範例),詳情請參閱相關手冊:

About

一個簡單的 springboot 後端, 與 Vue 前端的範例. A simple Admin WEB, based on Java with springboot backend with Vue frontend example.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages