Skip to content

jeremykit/parent-spring-tools

Repository files navigation

parent-spring-tools

License Java Spring Boot Maven Central GitHub stars PRs Welcome

Monorepo containing small Spring/utility modules for common development tasks.

English | 中文

Modules

Quick Start

<dependency>
    <groupId>org.springtools</groupId>
    <artifactId>spring-excel-mapper</artifactId>
    <version>1.0.0-SNAPSHOT</version>
</dependency>
// 1. Define model with annotations
@ExcelSheet
@ExcelRow(startRowIndex = 1)
public class StudentExcelModel {
    @ExcelColumn(col = "A", required = true)
    public String name;
    
    @ExcelColumn(col = "B", regex = "^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$")
    public String email;
    
    @ExcelColumn(col = "C", min = 18, max = 65)
    public Integer age;
}

// 2. Parse Excel (with validation)
Workbook workbook = WorkbookFactory.create(inputStream);
ImportResult<StudentExcelModel> result = 
    ExcelMapper.parseWorkbookWithResult(workbook, StudentExcelModel.class, false);

// 3. Export to template (preserves styles)
Sheet sheet = workbook.getSheet("Students");
ExcelExporter.fillTableRows(sheet, 1, result.getSuccessList(), StudentExcelModel.class);

See Usage Patterns for detailed examples.

Build

# Build all modules
mvn clean package

# Build specific module
mvn -pl spring-excel-mapper -am package

# Run example application
mvn -pl spring-tools-simples spring-boot:run

Documentation

Requirements

  • Java 17+
  • Spring Boot 2.7+ (for example module)
  • Apache POI 5.x

About

Collection of Spring utility modules for common tasks - annotation-driven Excel mapper with validation support

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages