mirror of
https://gitee.com/myxzgzs/boyue_jnpf.git
synced 2025-08-08 15:22:43 +08:00
83 lines
2.8 KiB
Markdown
83 lines
2.8 KiB
Markdown
> 特别说明:源码、JDK、数据库、Redis等安装或存放路径禁止包含中文、空格、特殊字符等
|
||
|
||
## 一 项目结构
|
||
|
||
```text
|
||
jnpf-file-core-starter
|
||
├── aspect- 切面层
|
||
├── exception- 自定义异常
|
||
├── platform - 存储平台实现层
|
||
└── recorder- 记录器
|
||
```
|
||
|
||
## 二 环境要求
|
||
|
||
| 类目 | 版本或建议 |
|
||
|-------|---------|
|
||
| 硬件 | 开发电脑建议使用I3及以上CPU,16G及以上内存 |
|
||
| 操作系统 | Windows 10/11,MacOS |
|
||
| JDK | 默认使用JDK 21,兼容JDK 8/11、JDK17(需调整部分代码),推荐使用 `OpenJDK`,如 `Liberica JDK`、`Eclipse Temurin`、`Alibaba Dragonwell`、`BiSheng` 等发行版; |
|
||
| Maven | 依赖管理工具,推荐使用 `3.6.3` 及以上版本 |
|
||
| IDE | 代码集成开发环境,推荐使用 `IDEA2024` 及以上版本,兼容 `Eclipse`、 `Spring Tool Suite` 等IDE工具 |
|
||
|
||
## 三 关联项目
|
||
> 为以下项目提供基础依赖
|
||
|
||
| 项目 | 分支 | 说明 |
|
||
| --- | --- | --- |
|
||
| jnpf-common | v5.2.x-stable | Java基础依赖项目源码 |
|
||
| jnpf-java-boot | v5.2.x-stable | Java单体后端项目源码 |
|
||
| jnpf-java-cloud | v5.2.x-stable | Java微服务后端项目源码 |
|
||
|
||
## 四 使用方式
|
||
|
||
### 4.1 前置条件
|
||
|
||
#### 4.1.1 本地安装jnpf-common-core
|
||
|
||
IDEA中打开 `jnpf-common` 项目, 双击右侧 `Maven` 中 `jnpf-common` > `jnpf-boot-common` > `jnpf-common-core` > `Lifecycle` > `install`,将 `jnpf-common-core` 包安装至本地
|
||
|
||
#### 4.1.2 本地安装dependencies
|
||
|
||
IDEA中打开 `jnpf-common` 项目,双击右侧 `Maven` 中 `jnpf-common` > `jnpf-dependencies` > `Lifecycle` > `install`,将 `jnpf-dependencies` 包安装至本地
|
||
|
||
### 4.2 本地安装
|
||
|
||
在IDEA中,双击右侧 `Maven` 中`jnpf-file-core-starter` > `Lifecycle` > `install`,将`jnpf-file-core-starter`包安装至本地
|
||
|
||
### 4.3 私服发布
|
||
> 若无Maven私服,忽略本节内容
|
||
|
||
#### 4.3.1 配置Maven
|
||
|
||
打开Maven安装目录中的 `conf/setttings.xml` ,
|
||
|
||
在 `<servers></servers>`节点增加 `<server></server>` ,如下所示:
|
||
|
||
```xml
|
||
<!-- 发布版 -->
|
||
<server>
|
||
<id>maven-releases</id>
|
||
<username>jnpf-user(账号,结合私服配置设置)</username>
|
||
<password>123456(密码,结合私服配置设置)</password>
|
||
</server>
|
||
```
|
||
#### 4.3.2 配置项目
|
||
|
||
> 注意:pom.xml里 `<id>` 和 setting.xml 配置里 `<id>` 对应。
|
||
|
||
IDEA打开 `jnpf-common` 项目, 修改 `jnpf-dependencies/pom.xml` 文件中私服配置
|
||
|
||
```xml
|
||
<distributionManagement>
|
||
<repository>
|
||
<id>maven-releases</id>
|
||
<name>maven-releases</name>
|
||
<url>http://nexus.jnpfsoft.com/repository/maven-releases/</url>
|
||
</repository>
|
||
</distributionManagement>
|
||
```
|
||
|
||
#### 4.3.3 发布到私服
|
||
|
||
在IDEA中,双击右侧 `Maven` 中 `jnpf-file-core-starter` > `Lifecycle` > `deploy` 发布至私服。 |