增加配置
This commit is contained in:
parent
0319a59a08
commit
941463700b
@ -1,33 +1,22 @@
|
||||
package com.cm.population.controller.apis.sysbasicinfo;
|
||||
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.excel.EasyExcelFactory;
|
||||
import com.alibaba.excel.ExcelWriter;
|
||||
import com.alibaba.excel.metadata.Sheet;
|
||||
import com.cm.common.base.AbstractController;
|
||||
import com.cm.common.constants.ISystemConstant;
|
||||
import com.cm.common.exception.SearchException;
|
||||
import com.cm.common.result.ErrorResult;
|
||||
import com.cm.common.result.SuccessResultData;
|
||||
import com.cm.population.dao.basepopulationinfo.IBasePopulationInfoDao;
|
||||
import com.cm.population.dao.sysbasicinfo.ISysBasicInfoDao;
|
||||
import com.cm.population.service.basepopulationinfo.IBasePopulationInfoService;
|
||||
import com.cm.population.uploadexcellistener.populationbaseinfo.BuildUploadListener;
|
||||
import com.cm.population.uploadexcellistener.populationbaseinfo.ImportToTableListener;
|
||||
import com.cm.population.uploadexcellistener.populationbaseinfo.PopulationBaseInfoUploadListener;
|
||||
import com.cm.population.uploadexcellistener.populationbaseinfo.BuildUploadListener;
|
||||
import com.cm.population.uploadexcellistener.populationbaseinfo.SearchUnImportUserListener;
|
||||
import com.cm.population.utils.ImportErrorData;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiResponse;
|
||||
import io.swagger.annotations.ApiResponses;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -127,16 +116,16 @@ public class SysBasicInfoController extends AbstractController {
|
||||
return new SuccessResultData("导入完成");
|
||||
}
|
||||
|
||||
/**
|
||||
* 筛选未导入到系统的人口信息
|
||||
* @param response
|
||||
* @throws IOException
|
||||
*/
|
||||
@PostMapping("export-un-import-user")
|
||||
public void exportUnImportUser(@RequestParam(value = "file") MultipartFile file, HttpServletResponse response) throws IOException {
|
||||
unImportList.clear();
|
||||
EasyExcel.read(file.getInputStream(), new SearchUnImportUserListener(populationDao, unImportList)).sheet().doRead();
|
||||
}
|
||||
// /**
|
||||
// * 筛选未导入到系统的人口信息
|
||||
// * @param response
|
||||
// * @throws IOException
|
||||
// */
|
||||
// @PostMapping("export-un-import-user")
|
||||
// public void exportUnImportUser(@RequestParam(value = "file") MultipartFile file, HttpServletResponse response) throws IOException {
|
||||
// unImportList.clear();
|
||||
// EasyExcel.read(file.getInputStream(), new SearchUnImportUserListener(populationDao, unImportList)).sheet().doRead();
|
||||
// }
|
||||
|
||||
@GetMapping("download-un-import-user")
|
||||
public void exportUnImportUser(HttpServletResponse response) throws IOException {
|
||||
|
@ -1,121 +0,0 @@
|
||||
server:
|
||||
port: 8093
|
||||
url: http://49.233.36.36:58093/population
|
||||
title: population
|
||||
servlet:
|
||||
context-path: /population
|
||||
|
||||
spring:
|
||||
thymeleaf:
|
||||
prefix: classpath:/templates/
|
||||
suffix: .html
|
||||
mode: HTML5
|
||||
encoding: UTF-8
|
||||
cache: false
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 1GB
|
||||
max-request-size: 1GB
|
||||
datasource:
|
||||
druid:
|
||||
url: jdbc:mysql://localhost:3306/db_cloud_population?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false
|
||||
db-type: mysql
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
username: root
|
||||
password: root
|
||||
initial-size: 2
|
||||
min-idle: 2
|
||||
max-active: 5
|
||||
max-wait: 60000
|
||||
time-between-eviction-runs-millis: 60000
|
||||
min-evictable-idle-time-millis: 300000
|
||||
validation-query: SELECT 1 FROM DUAL
|
||||
test-while-idle: true
|
||||
test-on-borrow: false
|
||||
test-on-return: false
|
||||
pool-prepared-statements: true
|
||||
max-pool-prepared-statement-per-connection-size: 10
|
||||
filter:
|
||||
commons-log:
|
||||
connection-logger-name: stat,wall,log4j
|
||||
stat:
|
||||
log-slow-sql: true
|
||||
slow-sql-millis: 2000
|
||||
connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
|
||||
use-global-data-source-stat: true
|
||||
|
||||
# 数据库
|
||||
mybatis:
|
||||
config-location: classpath:mybatis/mybatis-config.xml
|
||||
mapper-locations: classpath*:mybatis/mapper/**/*.xml
|
||||
|
||||
# 文档
|
||||
swagger:
|
||||
title: 接口文档
|
||||
description: 人口信息系统接口文档
|
||||
service-url: https://baidu.com/
|
||||
version: 1.0
|
||||
swagger-base-package: com.cm
|
||||
|
||||
# 文件
|
||||
file:
|
||||
uploadPath: /Users/wanggeng/Desktop/UploadFiles
|
||||
imageTypes: png,jpg,jpeg,gif,blob
|
||||
videoTypes: mp4
|
||||
audioTypes: mp3,wav,amr
|
||||
fileTypes: doc,docx,xls,xlsx,ppt,pptx,txt,zip,rar,apk,pdf
|
||||
maxFileCount: 6
|
||||
|
||||
# 安全
|
||||
security:
|
||||
oauth2:
|
||||
oauth-server: http://49.233.36.36:58090/usercenter
|
||||
oauth-logout: ${security.oauth2.oauth-server}/logout?redirect_uri=${server.url}
|
||||
client:
|
||||
client-id: ba950215f6bb4d45bddd6cbcb87395e7
|
||||
client-secret: WmlVZ2M4M2ZTeTdaS25OVlFwUExac3QrOU9kdHEybVgxSmhETTdFV2F5TW1ac2wwZTJHWk5NbXh3L3h3U2c4Rg==
|
||||
user-authorization-uri: ${security.oauth2.oauth-server}/oauth_client/authorize
|
||||
access-token-uri: ${security.oauth2.oauth-server}/oauth_client/token
|
||||
grant-type: authorization_code
|
||||
resource:
|
||||
jwt:
|
||||
key-uri: ${security.oauth2.oauth-server}/oauth_client/token_key
|
||||
token-info-uri: ${security.oauth2.oauth-server}/oauth_client/check_token
|
||||
user-info-uri: ${security.oauth2.oauth-server}/user
|
||||
authorization:
|
||||
check-token-access: ${security.oauth2.oauth-server}/oauth_client/token_key
|
||||
|
||||
api-path:
|
||||
user-center: ${security.oauth2.oauth-server}
|
||||
|
||||
# 访问控制
|
||||
access-control:
|
||||
pass-paths:
|
||||
- /index.html
|
||||
- /logout.html
|
||||
- /default.html
|
||||
- /assets/**
|
||||
- /route/file/downloadfile/**
|
||||
save-paths:
|
||||
- /**/save*/**
|
||||
- /**/add*/**
|
||||
delete-paths:
|
||||
- /**/delete*/**
|
||||
- /**/remove*/**
|
||||
update-paths:
|
||||
- /**/update*/**
|
||||
- /**/edit*/**
|
||||
query-paths:
|
||||
- /**/get*/**
|
||||
- /**/query*/**
|
||||
- /**/find*/**
|
||||
- /**/list*/**
|
||||
- /**/count*/**
|
||||
|
||||
# 日志
|
||||
logging:
|
||||
level:
|
||||
root: error
|
||||
com.cm: debug
|
Loading…
Reference in New Issue
Block a user