Skip to content

Conversation

@GOODBOY008
Copy link
Member

@GOODBOY008 GOODBOY008 commented Dec 29, 2025

Purpose of the pull request

Closes: #725

This PR implements the Fesod Examples Module Refactoring proposal to restructure the fesod-examples module by moving example code from src/test/java to src/main/java following Apache Spark/Flink patterns.

What's changed?

Phase 1: Restructured to Production Layout

Moved demo examples to src/main/java:

  • Created new package structure under org.apache.fesod.sheet.examples/:
    • quickstart/ - Simple read/write examples with data classes
    • read/ - Read examples with listeners, converters, and data classes
    • write/ - Write examples with handlers, styles, merge, and image export
    • fill/ - Template fill examples
    • advanced/ - Advanced usage examples (custom converters, large files, password protection)
    • web/ - Spring Boot web integration examples
    • util/ - Utility classes for examples

Key Examples Added/Migrated:

  • SimpleReadExample, SimpleWriteExample - Quickstart examples
  • BasicReadExample, ConverterReadExample, IndexOrNameReadExample, MultiSheetReadExample, NoModelReadExample, ExceptionHandlingExample
  • BasicWriteExample, StyleWriteExample, MergeWriteExample, ImageWriteExample
  • FillBasicExample, FillComplexExample
  • CustomConverterExample, LargeFileWriteExample, PasswordProtectionExample
  • WebExampleController, FesodWebApplication

Phase 2: Cleaned Up Temp Directory Classes

Removed all classes in the temp/ directory:

  • Bug reproduction tests for already-fixed issues
  • Issue-specific tests (issue1662, issue1663, issue2319, issue2443, issue406)
  • Experimental code not part of standard examples
  • POI compatibility tests
  • Cache-related tests
  • Large file tests that are no longer relevant

Also removed:

  • Obsolete test resource files (CSV, XLS/XLSX test files for removed temp tests)
  • Duplicate data classes and listeners

Other Improvements

  • Replaced System.out with proper SLF4J logging throughout examples
  • Added fastjson2 dependency for JSON serialization in examples
  • Migrated resource files to src/main/resources/example/
  • Updated package names to follow new structure
  • Cleaned up and improved code comments (translated Chinese comments to English)
  • Fixed deprecated API usages
Copilot AI review requested due to automatic review settings December 29, 2025 14:40
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR restructures the fesod-examples module by moving example code from src/test/java to src/main/java, following Apache Spark/Flink patterns, and removing temporary test code.

Key Changes:

  • Migrated example code from test to main source directory with new package structure
  • Removed all temporary test classes and resources in the temp/ directory
  • Updated logging configuration to remove Spring Boot dependency and use standalone logback

Reviewed changes

Copilot reviewed 156 out of 235 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pom.xml Downgraded logback-classic version and removed slf4j-simple dependency
fesod-sheet/src/test/resources/logback.xml Replaced Spring Boot logging pattern with standalone configuration
fesod-examples/pom.xml Added project encoding and deployment skip properties
fesod-examples/fesod-sheet-examples/src/test/resources/logback.xml Updated logging configuration with custom pattern and POI logger settings
Multiple temp/ test files Removed temporary test classes and data models
Multiple CSV/Excel resource files Removed test resource files for deleted temp tests
fesod-examples/fesod-sheet-examples/src/test/java/org/apache/fesod/sheet/demo/write/* Removed old demo test files
Comments suppressed due to low confidence (2)

pom.xml:1

  • The downgrade from logback-classic 1.5.23 to 1.2.13 is unusual and potentially problematic. Version 1.2.13 was released in 2023, but 1.5.23 appears to be from 2025 (based on the knowledge cutoff). If 1.5.23 exists, downgrading to 1.2.13 may lose important bug fixes and features. Verify that 1.5.23 is a valid version and document the reason for this downgrade.
    fesod-examples/fesod-sheet-examples/src/test/resources/poi/last_row_number_xssf_date_test.csv:1
  • The CSV test data contains dates in 2025 (e.g., 2025/3/25, 2025/3/26), which are in the future relative to the current date of December 29, 2025. While this file is being deleted, this comment documents the issue for reference.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant