重构项目

This commit is contained in:
2026-02-28 12:07:17 +08:00
parent f3c1fc98f7
commit c5a2ac3e24
7 changed files with 40 additions and 21 deletions

View File

@@ -4,11 +4,28 @@ jfinal-enjoy 5.2.2 的python 3.9.0 实现基于jpype1实现。
python port by mrzhou@miw.cn
### 使用样例
#### 示例1使用项目内置的jar文件推荐
```python
from enjoy import Enjoy
if __name__ == "__main__":
# 1. 配置参数(必须修改为你的实际路径)
# 1. 配置参数(仅需配置模板路径)
TEMPLATE_BASE_PATH = "./templates" # 模板文件所在目录如index.html放在这个目录下
# 2. 创建Enjoy实例初始化Engine自动使用内置的enjoy-5.2.2.jar
try:
enjoy = Enjoy(
template_base_path=TEMPLATE_BASE_PATH
)
```
#### 示例2指定自定义的jar文件路径
```python
from enjoy import Enjoy
if __name__ == "__main__":
# 1. 配置参数需配置jar路径和模板路径
JAR_PATH = "enjoy-5.2.2.jar" # enjoy-5.2.2.jar的绝对/相对路径
TEMPLATE_BASE_PATH = "./templates" # 模板文件所在目录如index.html放在这个目录下