Banner

星云ERP

2026-11-26

环境要求

  • JDK 1.8
  • MySQL 5.7 / 8.0
  • Redis(可选,缓存、会话)
  • Maven 3.6+
  • Node.js 14+(前端编译)

步骤 1:拉取源码

# 后端
git clone https://gitee.com/lframework/xingyun.git
# 前端
git clone https://gitee.com/lframework/xingyun-front.git

步骤 2:数据库初始化

  1. 新建数据库 xingyun,字符集 utf8mb4
  2. 执行脚本:xingyun-api/src/resources/db/all 全量初始化 SQL
  3. 增量升级脚本在 migration 目录,版本升级时执行

步骤 3:后端配置 & 启动

修改 application-self.yml

spring:
  datasource:
    url: jdbc:mysql://127.0.0.1:3306/xingyun?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
    username: root
    password: 你的密码

启动命令(单体 profile)

mvn -pl xingyun-api -am spring-boot:run -Dspring-boot.run.profiles=self

打包 jar:

mvn clean package -DskipTests -Pself

启动 jar 包:

java -jar xingyun-api.jar --spring.profiles.active=self

后端默认端口:8080

步骤 4:前端编译 + Nginx 部署

# 前端目录
pnpm install
pnpm build

得到 dist 包,Nginx 配置示例

server {
    listen 80;
    server_name localhost;
    root /xxx/dist;
    index index.html;
    location ^~ /api/ {
        proxy_pass http://127.0.0.1:8080/;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}

访问地址:http://服务器IP
默认账号:
admin / 123456

微服务版本额外说明

微服务需要 Nacos、Gateway、Redis 等中间件,适合多租户 SaaS 场景,部署复杂度更高,官方提供配套中间件包。



9