6 changed files with 10 additions and 64 deletions
@ -1,23 +0,0 @@
@@ -1,23 +0,0 @@
|
||||
package com.cloud.kicc.report.props; |
||||
|
||||
import com.cloud.kicc.common.core.constant.StringPool; |
||||
import lombok.Data; |
||||
import org.springframework.boot.context.properties.ConfigurationProperties; |
||||
|
||||
/** |
||||
*<p> |
||||
* UReport配置类 |
||||
*</p> |
||||
* |
||||
* @Author: wangxiang4 |
||||
* @since: 2023/7/5 |
||||
*/ |
||||
@Data |
||||
@ConfigurationProperties(prefix = "report") |
||||
public class ReportProperties { |
||||
private Boolean enabled = true; |
||||
private Boolean disableHttpSessionReportCache = false; |
||||
private Boolean disableFileProvider = true; |
||||
private String fileStoreDir = StringPool.EMPTY; |
||||
private Boolean debug = false; |
||||
} |
@ -1,27 +0,0 @@
@@ -1,27 +0,0 @@
|
||||
package com.cloud.kicc.report.provider; |
||||
|
||||
import com.bstek.ureport.UReportPropertyPlaceholderConfigurer; |
||||
import com.cloud.kicc.report.props.ReportProperties; |
||||
|
||||
import java.util.Properties; |
||||
|
||||
/** |
||||
*<p> |
||||
* UReport自定义配置 |
||||
*</p> |
||||
* |
||||
* @Author: wangxiang4 |
||||
* @since: 2023/7/5 |
||||
*/ |
||||
public class ReportPlaceholderProvider extends UReportPropertyPlaceholderConfigurer { |
||||
|
||||
public ReportPlaceholderProvider(ReportProperties properties) { |
||||
Properties props = new Properties(); |
||||
props.setProperty("ureport.disableHttpSessionReportCache", properties.getDisableHttpSessionReportCache().toString()); |
||||
props.setProperty("ureport.disableFileProvider", properties.getDisableFileProvider().toString()); |
||||
props.setProperty("ureport.fileStoreDir", properties.getFileStoreDir()); |
||||
props.setProperty("ureport.debug", properties.getDebug().toString()); |
||||
this.setProperties(props); |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue