tianwu.sun hai 9 meses
pai
achega
4379067c1b

+ 5 - 2
src/main/java/com/bootdo/system/service/impl/SessionServiceImpl.java

@@ -3,18 +3,18 @@ package com.bootdo.system.service.impl;
 import com.bootdo.common.utils.IPUtils;
 import com.bootdo.system.domain.UserDO;
 import com.bootdo.system.domain.UserOnline;
-import com.bootdo.system.domain.UserToken;
 import com.bootdo.system.service.SessionService;
 import org.apache.shiro.session.Session;
 import org.apache.shiro.session.mgt.eis.SessionDAO;
 import org.apache.shiro.subject.SimplePrincipalCollection;
 import org.apache.shiro.subject.support.DefaultSubjectContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
 import javax.servlet.http.HttpServletRequest;
-import java.security.Principal;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
@@ -26,6 +26,7 @@ import java.util.List;
  */
 @Service
 public class SessionServiceImpl implements SessionService {
+    private static final Logger log = LoggerFactory.getLogger(SessionServiceImpl.class);
     private final SessionDAO sessionDAO;
 
     @Value("${api-allow-ip}")
@@ -39,6 +40,7 @@ public class SessionServiceImpl implements SessionService {
     @Override
     public List<UserOnline> list(HttpServletRequest request) throws Exception{
         String ip = IPUtils.getIpAddr(request);
+        log.info("SessionServiceImpl.list.ip:{0}",ip);
         if (!apiAllowIp.contains(ip)) {
             throw new Exception("不允许访问");
         }
@@ -91,6 +93,7 @@ public class SessionServiceImpl implements SessionService {
     @Override
     public boolean forceLogout(String sessionId,HttpServletRequest request) throws Exception {
         String ip = IPUtils.getIpAddr(request);
+        log.info("SessionServiceImpl.forceLogout.ip:{0}",ip);
         if (!apiAllowIp.contains(ip)) {
             throw new Exception("不允许访问");
         }

+ 4 - 4
src/main/resources/application-test.yml

@@ -1,8 +1,8 @@
 bootdo:
-  uploadPath: /opt/streams/service/cic-data/res/reportin/
-  encPrival: /opt/streams/service/cic-data/reportin/sm2/sm2_client_enc_private.key
-  crtPrival: /opt/streams/service/cic-data/reportin/sm2/sm2_client_enc_cert.crt
-  licensePath: /opt/streams/service/cic-data/reportin/sm2/license.lic
+  uploadPath: /opt/streams/service/cic-data/res/data_filing/
+  encPrival: /opt/streams/service/cic-data/data_filing/sm2/sm2_client_enc_private.key
+  crtPrival: /opt/streams/service/cic-data/data_filing/sm2/sm2_client_enc_cert.crt
+  licensePath: /opt/streams/service/cic-data/data_filing/sm2/license.lic
   username: admin
   password: 111111