Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion website/community/contribution/contribute-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ This section explains how to build project from source code and also describe ho

## Workspace Preparation

To develop this project, you need **Maven 3.9 or above** and **JDK (Java Development Kit) 17 or above**. However, you must use **Java 1.8** compatible language features during compilation to ensure this project can run in environments with Java 1.8 or above.
To develop this project, you need **JDK (Java Development Kit) 8 or above** and Maven. The project builds and tests on JDK 8, 11, 17, 21 and 25, which is the CI matrix. **JDK 17 or above** is recommended for local development and is required to run the code formatter (`./mvnw spotless:apply` / `./mvnw spotless:check`). Whatever JDK you use, you must use **Java 1.8** compatible language features so that this project can run in environments with Java 1.8 or above.

Use the bundled Maven Wrapper (`./mvnw`, or `mvnw.cmd` on Windows), which downloads the Maven version pinned by the project (currently **Maven 3.6.3**), so no separate Maven installation is needed. If you prefer a locally installed Maven, use **3.6.3 or above**.

> You can use tools such as [SDKMAN](https://sdkman.io/) to configure multiple versions of the Java toolchain.

Expand Down
15 changes: 11 additions & 4 deletions website/docs/migration/from-fastexcel.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,17 @@ about when migrating, but require no action unless you want to use them:
(`colSplit`, `rowSplit`, `leftmostColumn`, `topRow`).
- **URL image security** (`org.apache.fesod.sheet.converters.url`):
`UrlImageFetchPolicy` (built with `SchemePolicy` and `CidrBlock`) guards the
built-in URL image converter against SSRF. By default only `http`/`https` and
public network addresses are allowed; private networks, hosts and CIDRs can
be allowlisted, and redirects (`maxRedirects`) and image size (`maxImageBytes`)
are capped.
built-in URL image converter against SSRF. Since 2.1.0-incubating, remote URL
image fetching is **disabled by default**: you must enable it with an explicit
exact-host allowlist (`allowedHosts`, no wildcards) via
`UrlImageConverter.setFetchPolicy(...)`. Allowlisted hosts are still limited
to `http`/`https` and public network addresses unless private networks, hosts
or CIDRs are also allowlisted, and redirects (`maxRedirects`) and image size
(`maxImageBytes`) are capped. If your FastExcel code wrote `URL` image fields,
configure the policy at application startup; otherwise the write fails with
an `IOException` (`Remote URL image fetching is disabled`). See
[URL Sources](../sheet/write/image.md#url-sources) and the
[Security Model](/community/security-model).
- **String image converters** (`org.apache.fesod.sheet.converters.string`):
`StringBase64ImageConverter` (base64 values, optional `data:` prefix) and
`StringPathnameImageConverter` (local file path) make the string-to-image
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ title: '代码贡献指南'

### 开发环境

需要 **3.8.1及以上版本的Maven** 和 **17及以上版本的JDK (Java Development Kit)** 。目前,开发环境推荐 **3.9.0** 及以上版本的Maven和 **21** 及以上的版本Java,但在编译过程中必须使用 **Java 1.8** 兼容的语言特性,保证能在 Java 1.8 及以上版本环境中运行。
需要 **8 及以上版本的 JDK (Java Development Kit)** 和 Maven。项目可在 JDK 8、11、17、21 和 25 上构建与测试,这也是 CI 的测试矩阵。本地开发推荐使用 **17 及以上版本的 JDK**,运行代码格式化工具(`./mvnw spotless:apply` / `./mvnw spotless:check`)时必须使用 JDK 17 及以上版本。无论使用哪个版本的 JDK,都必须只使用 **Java 1.8** 兼容的语言特性,保证项目能在 Java 1.8 及以上版本环境中运行。

请使用项目自带的 Maven Wrapper(`./mvnw`,Windows 下为 `mvnw.cmd`),它会下载项目固定的 Maven 版本(目前为 **Maven 3.6.3**),无需另外安装 Maven。如果希望使用本地安装的 Maven,请使用 **3.6.3 及以上版本**。

> 您可以使用 [SDKMAN](https://sdkman.io/) 等工具配置多版本的 Java 工具链。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ FastExcel 1.3 曾提供了 `FastExcelFactory` 作为第二个入口类,其 API
以下功能在 FastExcel 1.3.0 中不存在。迁移时值得了解,但除非你想使用它们,否则无需任何操作:

- **`@FreezePane`**(`org.apache.fesod.sheet.annotation.write.style.FreezePane`):类级注解,写入工作表时冻结行和/或列(`colSplit`、`rowSplit`、`leftmostColumn`、`topRow`)。
- **URL 图片安全**(`org.apache.fesod.sheet.converters.url`):`UrlImageFetchPolicy`(由 `SchemePolicy` 和 `CidrBlock` 构建)为内置的 URL 图片转换器提供 SSRF 防护。默认只允许 `http`/`https` 与公网地址;可通过白名单放行私网、主机和 CIDR,并可限制重定向次数(`maxRedirects`)与图片大小(`maxImageBytes`)。
- **URL 图片安全**(`org.apache.fesod.sheet.converters.url`):`UrlImageFetchPolicy`(由 `SchemePolicy` 和 `CidrBlock` 构建)为内置的 URL 图片转换器提供 SSRF 防护。自 2.1.0-incubating 起,远程 URL 图片获取**默认关闭**,必须通过 `UrlImageConverter.setFetchPolicy(...)` 配置显式的精确主机白名单(`allowedHosts`,不支持通配符)才能启用。白名单内的主机仍只允许 `http`/`https` 与公网地址,除非另外放行私网、主机或 CIDR;重定向次数(`maxRedirects`)与图片大小(`maxImageBytes`)也会受到限制。如果原 FastExcel 代码写出了 `URL` 类型的图片字段,请在应用启动时配置该策略,否则写出会因 `IOException`(`Remote URL image fetching is disabled`)而失败。详见 [URL 来源](../sheet/write/image.md#url-来源)与[安全模型](/community/security-model)。
- **字符串图片转换器**(`org.apache.fesod.sheet.converters.string`):`StringBase64ImageConverter`(base64 值,可选 `data:` 前缀)与 `StringPathnameImageConverter`(本地文件路径)将字符串转图片的转换显式化,兼容的 `StringImageConverter` 仍然保留。
- **`HeadBuilder` / `DefaultHeadBuilder`**(`org.apache.fesod.sheet.metadata`):无 Bean 模式下的流式表头构建,例如 `FesodSheet.write(pathname).head(builder -> builder.column("ID", 2).columns("User Info", sub -> sub.column("Name").column("Age")))`。
- **`HeaderMergeStrategy`**(`org.apache.fesod.sheet.enums.HeaderMergeStrategy`):显式控制表头合并——`NONE`、`HORIZONTAL_ONLY`、`VERTICAL_ONLY`、`FULL_RECTANGLE`、`AUTO`——通过写构建器上的 `headerMergeStrategy(...)` 设置,取代布尔开关 `automaticMergeHead`。
Expand Down
Loading