Compare commits

...

6 Commits

Author SHA1 Message Date
wangliwen 15fda12059 flyway 设置默认开启 2022-06-15 15:27:06 +08:00
wangliwen 81d362275a Merge remote-tracking branch 'origin/master' 2022-06-15 14:23:29 +08:00
wangliwen 789abbcc04 ... 2022-06-15 14:23:09 +08:00
dinggang 848f507b13 查看请求ip 2022-06-15 14:11:18 +08:00
wangliwen c31ea91477 2022-06-14 20:13:13 +08:00
wangliwen c6a1ac6c3e ... 2022-06-14 16:27:57 +08:00
5 changed files with 26 additions and 18 deletions

View File

@ -570,7 +570,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
@Override @Override
public void KnowledgeBase() { public void KnowledgeBase() {
final List<String> knowledgeUUID = final List<String> knowledgeUUID =
jdbcTemplate.queryForList("SELECT note1 FROM tb_data_resource WHERE type ='知识库';", String.class) jdbcTemplate.queryForList("SELECT note1 FROM tb_data_resource WHERE type ='知识库' AND note1 IS NOT NULL FOR UPDATE;", String.class)
.stream().distinct().collect(Collectors.toList()); .stream().distinct().collect(Collectors.toList());
final int pageSize = 100; final int pageSize = 100;
final OkHttpClient client = new OkHttpClient(); final OkHttpClient client = new OkHttpClient();

View File

@ -10,21 +10,21 @@ spring:
username: root username: root
password: Hisense2019 password: Hisense2019
#Hisense2019 #Hisense2019
# #Oracle # #Oracle
# driver-class-name: oracle.jdbc.OracleDriver # driver-class-name: oracle.jdbc.OracleDriver
# url: jdbc:oracle:thin:@192.168.10.10:1521:xe # url: jdbc:oracle:thin:@192.168.10.10:1521:xe
# username: renren_security # username: renren_security
# password: 123456 # password: 123456
# #SQLServer # #SQLServer
# driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver # driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
# url: jdbc:sqlserver://localhost:1433;DatabaseName=security_enterprise # url: jdbc:sqlserver://localhost:1433;DatabaseName=security_enterprise
# username: sa # username: sa
# password: 123456 # password: 123456
# #postgresql # #postgresql
# driver-class-name: org.postgresql.Driver # driver-class-name: org.postgresql.Driver
# url: jdbc:postgresql://192.168.10.10:5432/postgres # url: jdbc:postgresql://192.168.10.10:5432/postgres
# username: postgres # username: postgres
# password: 123456 # password: 123456
initial-size: 10 initial-size: 10
max-active: 100 max-active: 100
min-idle: 10 min-idle: 10
@ -58,10 +58,13 @@ resource:
pic-host: http://${resource.root_url}:${server.port}${server.servlet.context-path} pic-host: http://${resource.root_url}:${server.port}${server.servlet.context-path}
path: /home/yth/files/ path: /home/yth/files/
devModelFilePath: /home/yth/files/devModelFile devModelFilePath: /home/yth/files/devModelFile
# 大数据部门相关配置
# 大数据部门相关配置(平台部署部门)
big_date: big_date:
name: 青岛市大数据发展管理局 name: 青岛市大数据发展管理局
assignee_role_name: 部门审批人 assignee_role_name: 部门审批人
# 平台部署级别 (PROVINCE:省 PREFECTURE:地级市 DISTRICT:区县 STREET:街道)
stage: PREFECTURE
hisense: hisense:
gateway: gateway:

View File

@ -52,6 +52,7 @@ spring:
resources: resources:
static-locations: classpath:/static,classpath:/public,file:${resource.path} static-locations: classpath:/static,classpath:/public,file:${resource.path}
flyway: flyway:
enable: true
locations: classpath:db locations: classpath:db
baseline-on-migrate: true baseline-on-migrate: true
baseline-version: 0 baseline-version: 0

View File

@ -6,6 +6,8 @@ import io.renren.common.exception.RenException;
import io.renren.entity.TokenEntity; import io.renren.entity.TokenEntity;
import io.renren.service.TokenService; import io.renren.service.TokenService;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.web.method.HandlerMethod; import org.springframework.web.method.HandlerMethod;
@ -24,10 +26,12 @@ public class AuthorizationInterceptor extends HandlerInterceptorAdapter {
private TokenService tokenService; private TokenService tokenService;
public static final String USER_KEY = "userId"; public static final String USER_KEY = "userId";
public static final Logger LOGGER = LoggerFactory.getLogger(AuthorizationInterceptor.class);
@Override @Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
Login annotation; Login annotation;
LOGGER.info("请求地址:{}", request.getRemoteAddr());
if(handler instanceof HandlerMethod) { if(handler instanceof HandlerMethod) {
annotation = ((HandlerMethod) handler).getMethodAnnotation(Login.class); annotation = ((HandlerMethod) handler).getMethodAnnotation(Login.class);
}else{ }else{