-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf($Excel): make
maximumRowCount
configurable
- Loading branch information
1 parent
9ab350f
commit 8865ead
Showing
5 changed files
with
60 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,5 @@ maf: | |
- "api-gateway" | ||
- "spring-boot-admin" | ||
- "auth-center" | ||
excel: | ||
maximum-row-count: 3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
...in/java/com/jmsoftware/maf/springcloudstarter/configuration/ExcelImportConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package com.jmsoftware.maf.springcloudstarter.configuration; | ||
|
||
import cn.hutool.core.util.ObjectUtil; | ||
import com.google.common.collect.Lists; | ||
import lombok.Data; | ||
import lombok.extern.slf4j.Slf4j; | ||
import lombok.val; | ||
import org.springframework.boot.context.properties.ConfigurationProperties; | ||
import org.springframework.cloud.context.config.annotation.RefreshScope; | ||
import org.springframework.stereotype.Component; | ||
import org.springframework.validation.annotation.Validated; | ||
|
||
import javax.annotation.PostConstruct; | ||
import javax.validation.Valid; | ||
import javax.validation.constraints.Min; | ||
import javax.validation.constraints.NotBlank; | ||
import javax.validation.constraints.NotNull; | ||
import javax.validation.constraints.Pattern; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
/** | ||
* <h1>CustomConfiguration</h1> | ||
* <p>Custom configurations which are written in .yml files, containing a variety of fragmentary configs. Such as, | ||
* Druid login info, web security switch, web log and so on.</p> | ||
* | ||
* @author Johnny Miller (锺俊), email: johnnysviva@outlook.com | ||
* @date 2019-03-23 14:24 | ||
**/ | ||
@Data | ||
@Slf4j | ||
@Validated | ||
@Component | ||
@RefreshScope | ||
@ConfigurationProperties(prefix = "maf.configuration.excel") | ||
public class ExcelImportConfiguration { | ||
@Min(2) | ||
@NotNull | ||
private Integer maximumRowCount; | ||
|
||
@PostConstruct | ||
private void postConstruct() { | ||
log.warn("Initial bean: '{}'", this.getClass().getSimpleName()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters