浏览代码

单点登录

tianwu.sun 9 月之前
父节点
当前提交
11d6c05ffa

+ 0 - 3
src/main/java/com/bootdo/common/exception/MainsiteErrorController.java

@@ -7,15 +7,12 @@ import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.web.servlet.error.ErrorAttributes;
 import org.springframework.boot.web.servlet.error.ErrorController;
-import org.springframework.http.HttpStatus;
-import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.servlet.ModelAndView;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import java.util.Map;
 
 @RestController
 public class MainsiteErrorController implements ErrorController {

+ 19 - 0
src/main/java/com/bootdo/common/token/Header.java

@@ -0,0 +1,19 @@
+package com.bootdo.common.token;
+
+import java.io.Serializable;
+
+/**
+ * @author 宋显哲
+ * @version 1.0.0 创建于 2018/1/18
+ **/
+public class Header implements Serializable {
+    private long timestamp;
+
+    public long getTimestamp() {
+        return timestamp;
+    }
+
+    public void setTimestamp(long timestamp) {
+        this.timestamp = timestamp;
+    }
+}

+ 31 - 0
src/main/java/com/bootdo/common/token/Payload.java

@@ -0,0 +1,31 @@
+package com.bootdo.common.token;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author 宋显哲
+ * @version 1.0.0 创建于 2018/1/18
+ **/
+@Data
+public class Payload implements Serializable {
+    @ApiModelProperty("用户ID")
+    private Long userId;
+
+    @ApiModelProperty("用户账号")
+    private String username;
+
+    @ApiModelProperty("用户密码")
+    private String password;
+
+    @Override
+    public String toString() {
+        return "Payload{" +
+                "userId='" + userId + '\'' +
+                ", username='" + username + '\''+
+                ", password='" + password + '\''+
+                '}';
+    }
+}

+ 37 - 0
src/main/java/com/bootdo/common/token/Token.java

@@ -0,0 +1,37 @@
+package com.bootdo.common.token;
+
+import java.io.Serializable;
+
+/**
+ * @author 宋显哲
+ * @version 1.0.0 创建于 2018/1/18
+ **/
+public class Token implements Serializable {
+    private Header header;
+    private Payload payload;
+    private String sig;
+
+    public Header getHeader() {
+        return header;
+    }
+
+    public void setHeader(Header header) {
+        this.header = header;
+    }
+
+    public Payload getPayload() {
+        return payload;
+    }
+
+    public void setPayload(Payload payload) {
+        this.payload = payload;
+    }
+
+    public String getSig() {
+        return sig;
+    }
+
+    public void setSig(String sig) {
+        this.sig = sig;
+    }
+}

文件差异内容过多而无法显示
+ 100 - 0
src/main/java/com/bootdo/common/token/TokenUtil.java


+ 98 - 0
src/main/java/com/bootdo/common/utils/AesUtil.java

@@ -0,0 +1,98 @@
+package com.bootdo.common.utils;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.crypto.BadPaddingException;
+import javax.crypto.Cipher;
+import javax.crypto.IllegalBlockSizeException;
+import javax.crypto.NoSuchPaddingException;
+import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.SecretKeySpec;
+import java.io.UnsupportedEncodingException;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.util.Base64;
+
+/**
+ * @author 宋显哲
+ * @version 1.0.0 创建于 2018/1/18
+ **/
+public final class AesUtil {
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(AesUtil.class);
+    private static final String UTF8 = "utf-8";
+    //key长16字节
+    private static final int KEY_LENGTH = 16;
+
+    /**
+     * 方法名称:AES 加密<br>
+     * 方法作用:对普通字符串进行AES加密
+     *
+     * @param content 等待加密的字符串
+     * @param key     加/解密 密钥
+     * @param iv      加/解密 初始化向量
+     * @return 返回加密后的字符串
+     * @throws Exception 异常信息
+     */
+    public static String encrypt(String content, String key, String iv) throws UnsupportedEncodingException, NoSuchPaddingException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, InvalidKeyException, BadPaddingException, IllegalBlockSizeException {
+        if (key == null) {
+            LOGGER.error("Key为空null");
+            return null;
+        }
+
+        // 判断Key是否为16位
+        if (key.getBytes(UTF8).length != KEY_LENGTH) {
+            LOGGER.error("Key长度不是16位");
+            return null;
+        }
+
+        byte[] raw = key.getBytes();
+        SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
+        //"算法/模式/补码方式"
+        Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
+        //使用CBC模式,需要一个向量iv,可增加加密算法的强度
+        cipher.init(Cipher.ENCRYPT_MODE, skeySpec, new IvParameterSpec(iv.getBytes(UTF8)));
+        byte[] encrypted = cipher.doFinal(content.getBytes(UTF8));
+        //此处使用BAES64做转码功能。
+        return Base64.getEncoder().encodeToString(encrypted);
+    }
+
+    /**
+     * 方法名称:AES 解密<br>
+     * 方法作用:对经过Aes加密后的字符串进行解密,
+     *
+     * @param content 待解密内容字符串
+     * @param key     加/解密 密钥
+     * @param iv      加/解密 初始化向量
+     * @return 返回解密后的内容
+     * @throws Exception 异常
+     */
+    public static String decrypt(String content, String key, String iv) throws Exception {
+        try {
+            // 判断Key是否正确
+            if (key == null) {
+                LOGGER.error("Key为空null");
+                return null;
+            }
+
+            // 判断Key是否为16位
+            if (key.getBytes(UTF8).length != KEY_LENGTH) {
+                LOGGER.error("Key长度不是16位");
+                return null;
+            }
+
+            byte[] raw = key.getBytes(UTF8);
+            SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
+            Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
+            cipher.init(Cipher.DECRYPT_MODE, skeySpec, new IvParameterSpec(iv.getBytes(UTF8)));
+            byte[] encrypted1 = Base64.getDecoder().decode(content);
+            byte[] original = cipher.doFinal(encrypted1);
+            return new String(original);
+        } catch (Exception ex) {
+            LOGGER.error("AES解码异常,异常信息:" + ex.getMessage());
+            return null;
+        }
+    }
+}

+ 31 - 0
src/main/java/com/bootdo/common/utils/CommonConfUtil.java

@@ -0,0 +1,31 @@
+package com.bootdo.common.utils;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Properties;
+
+/**
+ * @author 宋显哲
+ * @version 1.0.0 创建于 2017/12/28
+ **/
+public final class CommonConfUtil {
+    private static final Logger logger = LogManager.getLogger(CommonConfUtil.class);
+    private static HashMap<String, String> map = new HashMap<>();
+
+    static {
+        try {
+            Properties properties = new Properties();
+            properties.load(CommonConfUtil.class.getResourceAsStream("/common.properties"));
+            properties.keySet().iterator().forEachRemaining(k -> map.put(String.valueOf(k), String.valueOf(properties.get(k))));
+        } catch (IOException e) {
+            logger.error("读取配置文件错误,错误信息:" + e.getMessage());
+        }
+    }
+
+    public static String getConf(String key) {
+        return map.get(key);
+    }
+}

+ 18 - 0
src/main/java/com/bootdo/common/utils/JsonUtil.java

@@ -0,0 +1,18 @@
+package com.bootdo.common.utils;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+/**
+ * @version 1.0.0 创建于 2019/8/6
+ **/
+public final class JsonUtil {
+    private JsonUtil(){}
+    private static ObjectMapper objectMapper = new ObjectMapper();
+
+    public static String toJson(Object obj) throws Exception {
+        return objectMapper.writeValueAsString(obj);
+    }
+    public static <T> T fromJson(String jsonStr,Class<T> clazz) throws Exception {
+        return objectMapper.readValue(jsonStr,clazz);
+    }
+}

+ 87 - 0
src/main/java/com/bootdo/common/utils/RsaUtil.java

@@ -0,0 +1,87 @@
+package com.bootdo.common.utils;
+
+import java.security.*;
+import java.security.interfaces.RSAPrivateKey;
+import java.security.interfaces.RSAPublicKey;
+import java.security.spec.PKCS8EncodedKeySpec;
+import java.security.spec.X509EncodedKeySpec;
+import java.util.Base64;
+
+/**
+ * @author 宋显哲
+ * @version 1.0.0 创建于 2018/1/18
+ **/
+public final class RsaUtil {
+
+    /**
+     * 创建签名公私密钥对
+     *
+     * @return 返回公私要对数组,第一个元素为私钥,第二个元素为公钥
+     * @throws Exception 异常信息
+     */
+    public static String[] createSecretPriPubKey() throws Exception {
+        KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA");
+        keyPairGenerator.initialize(512);
+        KeyPair keyPair = keyPairGenerator.generateKeyPair();
+        RSAPublicKey rsaPublicKey = (RSAPublicKey) keyPair.getPublic();
+        RSAPrivateKey rsaPrivateKey = (RSAPrivateKey) keyPair.getPrivate();
+
+        String[] keyPairArr = {
+                Base64.getEncoder().encodeToString(rsaPrivateKey.getEncoded()),
+                Base64.getEncoder().encodeToString(rsaPublicKey.getEncoded())
+        };
+
+        System.out.println("私钥==>" + keyPairArr[0]);
+        System.out.println("公钥==>" + keyPairArr[1]);
+        return keyPairArr;
+    }
+
+    /**
+     * 对文本内容进行数字签名
+     *
+     * @param sigContent 带签名内容
+     * @param priKey     签名私钥
+     * @return 返回签名
+     * @throws Exception 异常
+     */
+    public static String signature(String priKey, String sigContent) throws Exception {
+        KeyFactory keyFactory = KeyFactory.getInstance("RSA");
+        PrivateKey privateKey = keyFactory.generatePrivate(
+                new PKCS8EncodedKeySpec(Base64.getDecoder().decode(priKey))
+        );
+        Signature signature = Signature.getInstance("MD5withRSA");
+        signature.initSign(privateKey);
+        signature.update(sigContent.getBytes("UTF-8"));
+        return Base64.getEncoder().encodeToString(signature.sign());
+    }
+
+    /**
+     * 用公钥验证签名
+     *
+     * @param pubKey  公钥
+     * @param content 待验证内容
+     * @param sig     签名
+     * @return 返回验证结果,true为验证通过,false为验证失败
+     * @throws Exception 异常信息
+     */
+    public static boolean verifySig(String pubKey, String content, String sig) throws Exception {
+        X509EncodedKeySpec x509EncodedKeySpec = new X509EncodedKeySpec(
+                Base64.getDecoder().decode(pubKey)
+        );
+        KeyFactory keyFactory = KeyFactory.getInstance("RSA");
+        PublicKey publicKey = keyFactory.generatePublic(x509EncodedKeySpec);
+        Signature signature = Signature.getInstance("MD5withRSA");
+        signature.initVerify(publicKey);
+        signature.update(content.getBytes());
+        return signature.verify(Base64.getDecoder().decode(sig));
+    }
+
+    public static void main(String[] ars){
+        try {
+            createSecretPriPubKey();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+    }
+}

+ 1 - 0
src/main/java/com/bootdo/system/config/ShiroConfig.java

@@ -122,6 +122,7 @@ public class ShiroConfig {
         // url过滤规则
         LinkedHashMap<String, String> filterChainDefinitionMap = new LinkedHashMap<>();
         filterChainDefinitionMap.put("/login", "anon");
+        filterChainDefinitionMap.put("/loginWithToken", "anon");
         filterChainDefinitionMap.put("/code", "anon");
         filterChainDefinitionMap.put("/sso/**", "anon");
         filterChainDefinitionMap.put("/getVerify", "anon");

+ 56 - 8
src/main/java/com/bootdo/system/controller/LoginController.java

@@ -7,8 +7,13 @@ import com.bootdo.common.controller.BaseController;
 import com.bootdo.common.domain.FileDO;
 import com.bootdo.common.domain.Tree;
 import com.bootdo.common.service.FileService;
+import com.bootdo.common.token.Header;
+import com.bootdo.common.token.Payload;
+import com.bootdo.common.token.Token;
+import com.bootdo.common.token.TokenUtil;
 import com.bootdo.common.utils.*;
 import com.bootdo.system.domain.MenuDO;
+import com.bootdo.system.domain.UserDO;
 import com.bootdo.system.service.MenuService;
 import com.bootdo.system.service.ThirdMsgLogDOService;
 import org.apache.shiro.SecurityUtils;
@@ -21,9 +26,8 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.util.ObjectUtils;
+import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
@@ -57,6 +61,8 @@ public class LoginController extends BaseController {
     @Resource
     private ThirdMsgLogDOService thirdMsgLogDOService;
 
+    @Resource
+    private TokenUtil tokenUtil;
 
     @GetMapping({"/", ""})
     String welcome(Model model) {
@@ -71,8 +77,8 @@ public class LoginController extends BaseController {
 
     @Log("请求访问主页")
     @GetMapping({"/index"})
-    String index(Model model) {
-        List<Tree<MenuDO>> menus = menuService.listMenuTree(getUserId());
+    String index(@RequestParam("sysFlag") String sysFlag, Model model) {
+        List<Tree<MenuDO>> menus = menuService.listMenuTree(sysFlag,getUserId());
         model.addAttribute("menus", menus);
         model.addAttribute("name", getUser().getName());
         FileDO fileDO = fileService.get(getUser().getPicId());
@@ -150,16 +156,58 @@ public class LoginController extends BaseController {
             return R.error("验证码校验失败");
         }
         password = MD5Utils.encrypt(username, password);
-        UsernamePasswordToken token = new UsernamePasswordToken(username, password);
+        UsernamePasswordToken usernamePasswordToken = new UsernamePasswordToken(username, password);
         Subject subject = SecurityUtils.getSubject();
         try {
-            subject.login(token);
+            subject.login(usernamePasswordToken);
+
             return R.ok();
-        } catch (AuthenticationException e) {
+        } catch (Exception e) {
             return R.error("用户或密码错误");
         }
     }
 
+    @Log("使用token登录")
+    @GetMapping("/loginWithToken")
+    String loginWithToken(String token) {
+        try {
+            if(ObjectUtils.isEmpty(token)){
+                throw new Exception("token不能为空");
+            }
+
+            Token tokenObj = tokenUtil.getToken(token);
+            if(ObjectUtils.isEmpty(tokenObj) || !tokenUtil.verifyToken(tokenObj)){
+                throw new Exception("token无效");
+            }
+            Payload payload = tokenObj.getPayload();
+            String username = payload.getUsername();
+            String password = payload.getPassword();
+
+            UsernamePasswordToken usernamePasswordToken = new UsernamePasswordToken(username, password);
+            Subject subject = SecurityUtils.getSubject();
+            subject.login(usernamePasswordToken);
+            return "loginWithToken";
+        } catch (Exception e) {
+            e.printStackTrace();
+            return "login";
+        }
+
+    }
+
+    /**
+     * 获取当前token
+     */
+    @GetMapping(value = "/getCurrToken")
+    @ResponseBody
+    public String getCurrToken() {
+        try {
+           return tokenUtil.createCurrTokenString();
+        } catch (Exception e) {
+            logger.error("获取当前token失败>>>> ", e);
+            return null;
+        }
+    }
+
     @GetMapping("/logout")
     String logout() {
         ShiroUtils.logout();

+ 1 - 1
src/main/java/com/bootdo/system/dao/MenuDao.java

@@ -30,7 +30,7 @@ public interface MenuDao {
 	
 	int batchRemove(Long[] menuIds);
 	
-	List<MenuDO> listMenuByUserId(Long id);
+	List<MenuDO> listMenuByUserId(String sysFlag,Long id);
 	
 	List<String> listUserPerms(Long id);
 }

+ 2 - 2
src/main/java/com/bootdo/system/service/MenuService.java

@@ -11,9 +11,9 @@ import com.bootdo.system.domain.MenuDO;
 
 @Service
 public interface MenuService {
-	Tree<MenuDO> getSysMenuTree(Long id);
+	//Tree<MenuDO> getSysMenuTree(Long id);
 
-	List<Tree<MenuDO>> listMenuTree(Long id);
+	List<Tree<MenuDO>> listMenuTree(String sysFlag,Long id);
 
 	Tree<MenuDO> getTree();
 

+ 26 - 26
src/main/java/com/bootdo/system/service/impl/MenuServiceImpl.java

@@ -22,30 +22,30 @@ public class MenuServiceImpl implements MenuService {
 	@Autowired
 	RoleMenuDao roleMenuMapper;
 
-	/**
-	 * @param
-	 * @return 树形菜单
-	 */
-	@Cacheable
-	@Override
-	public Tree<MenuDO> getSysMenuTree(Long id) {
-		List<Tree<MenuDO>> trees = new ArrayList<Tree<MenuDO>>();
-		List<MenuDO> menuDOs = menuMapper.listMenuByUserId(id);
-		for (MenuDO sysMenuDO : menuDOs) {
-			Tree<MenuDO> tree = new Tree<MenuDO>();
-			tree.setId(sysMenuDO.getMenuId().toString());
-			tree.setParentId(sysMenuDO.getParentId().toString());
-			tree.setText(sysMenuDO.getName());
-			Map<String, Object> attributes = new HashMap<>(16);
-			attributes.put("url", sysMenuDO.getUrl());
-			attributes.put("icon", sysMenuDO.getIcon());
-			tree.setAttributes(attributes);
-			trees.add(tree);
-		}
-		// 默认顶级菜单为0,根据数据库实际情况调整
-		Tree<MenuDO> t = BuildTree.build(trees);
-		return t;
-	}
+//	/**
+//	 * @param
+//	 * @return 树形菜单
+//	 */
+//	@Cacheable
+//	@Override
+//	public Tree<MenuDO> getSysMenuTree(Long id) {
+//		List<Tree<MenuDO>> trees = new ArrayList<Tree<MenuDO>>();
+//		List<MenuDO> menuDOs = menuMapper.listMenuByUserId(id);
+//		for (MenuDO sysMenuDO : menuDOs) {
+//			Tree<MenuDO> tree = new Tree<MenuDO>();
+//			tree.setId(sysMenuDO.getMenuId().toString());
+//			tree.setParentId(sysMenuDO.getParentId().toString());
+//			tree.setText(sysMenuDO.getName());
+//			Map<String, Object> attributes = new HashMap<>(16);
+//			attributes.put("url", sysMenuDO.getUrl());
+//			attributes.put("icon", sysMenuDO.getIcon());
+//			tree.setAttributes(attributes);
+//			trees.add(tree);
+//		}
+//		// 默认顶级菜单为0,根据数据库实际情况调整
+//		Tree<MenuDO> t = BuildTree.build(trees);
+//		return t;
+//	}
 
 	@Override
 	public List<MenuDO> list(Map<String, Object> params) {
@@ -141,9 +141,9 @@ public class MenuServiceImpl implements MenuService {
 	}
 
 	@Override
-	public List<Tree<MenuDO>> listMenuTree(Long id) {
+	public List<Tree<MenuDO>> listMenuTree(String sysFlag, Long id) {
 		List<Tree<MenuDO>> trees = new ArrayList<Tree<MenuDO>>();
-		List<MenuDO> menuDOs = menuMapper.listMenuByUserId(id);
+		List<MenuDO> menuDOs = menuMapper.listMenuByUserId(sysFlag, id);
 		for (MenuDO sysMenuDO : menuDOs) {
 			Tree<MenuDO> tree = new Tree<MenuDO>();
 			tree.setId(sysMenuDO.getMenuId().toString());

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

@@ -41,9 +41,9 @@ spring:
     # 合并多个DruidDataSource的监控数据
     #useGlobalDataSourceStat: true
   redis:
-    host: 123.56.114.197
-    port: 6379
-    password: pinganfabu
+    host: 124.70.58.209
+    port: 7001
+    password: 106@qwe123
     # 连接超时时间(毫秒)
     timeout: 10000
     jedis:

+ 2 - 2
src/main/resources/application.yml

@@ -19,9 +19,9 @@ spring:
     date-format: yyyy-MM-dd HH:mm:ss
   profiles:
 #    开发环境
-#    active: dev
+    active: dev
 #    测试环境
-    active: test
+#    active: test
 #    #生产环境
 #    active: prod
   servlet:

+ 7 - 0
src/main/resources/common.properties

@@ -0,0 +1,7 @@
+#\u6570\u5B57\u7B7E\u540D\u516C\u79C1\u94A5\u548Caes\u52A0\u5BC6\u5BC6\u94A5
+sig.pubKey=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANZ+tnvROI94v/ejEUQowM0yojLywd4zSSmR/Dcznl7zcNMKXN72xMkK0mEJUD3mRYSVfaWHKA7Ly9Bh5TonDBcCAwEAAQ==
+sig.priKey=MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEA1n62e9E4j3i/96MRRCjAzTKiMvLB3jNJKZH8NzOeXvNw0wpc3vbEyQrSYQlQPeZFhJV9pYcoDsvL0GHlOicMFwIDAQABAkBIRL81LoPxCw0a4Y1SuqxjNrkhk1swg3UWFYK2EqU8dgjYXB+M8rzsddJbFxa2cpeVXCWTwxB7aIf9F958AbwRAiEA/cLepqStl8D9U4c3+TXoJGD898kqF5jozJ8oVlhDf08CIQDYYyieCt1GaGA94YLCozSPuFiGyhKnOxVa7QJgizw0uQIgZOqtfxo4iwRN+nzo7qvYgTctAyG2IqJF2rJk6Um6thMCID6hjMsZx+wuH9UpZaiihn8m03DIIlgHEOpNeYeqJVX5AiB1t3Mk3+Ci3UgYvGlhoDathO5KnkVwTyFy/oWQXuE8uA==
+aes.key=sbj106tw20240608
+aes.iv=Z8CRFVTGB3GYHT8B
+
+

+ 1 - 0
src/main/resources/mybatis/system/MenuMapper.xml

@@ -121,6 +121,7 @@
 		on rm.role_id =ur.role_id where ur.user_id = #{id}
 		and
 		m.type in(0,1)
+		<if test="sysFlag != null and sysFlag != ''"> and m.sys_flag = #{sysFlag} </if>
 		order by
 		m.order_num asc
 	</select>

+ 1 - 1
src/main/resources/templates/login.html

@@ -115,7 +115,7 @@
                     var index = layer.load(1, {
                         shade: [0.1, '#fff'] //0.1透明度的白色背景
                     });
-                    parent.location.href = '/index';
+                    parent.location.href = '/index?sysFlag=';
                 } else {
                     layer.msg(r.msg);
                 }

+ 50 - 0
src/main/resources/templates/loginWithToken.html

@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport"
+          content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
+    <title>工业领域重要数据和核心数据识别备案管理客户端-管理侧</title>
+    <meta name="keywords" content="工业领域重要数据和核心数据识别备案管理客户端-管理侧">
+    <meta name="description" content="工业领域重要数据和核心数据识别备案管理客户端-管理侧">
+    <link rel="shortcut icon" href="favicon.ico">
+    <link href="/css/bootstrap.min.css" rel="stylesheet">
+    <link href="/css/font-awesome.css?v=4.4.0" rel="stylesheet">
+    <link href="/css/animate.css" rel="stylesheet">
+    <link href="/css/style.css" rel="stylesheet">
+    <link href="/css/login.css" rel="stylesheet">
+    <!--[if lt IE 9]>
+    <meta http-equiv="refresh" content="0;ie.html"/>
+    <![endif]-->
+    <script>
+        if (window.top !== window.self) {
+            window.top.location = window.location;
+        }
+    </script>
+
+</head>
+
+<body class="signin">
+
+<script th:inline="javascript"> var ctx = [[@{
+    /}]] ; </script>
+<!-- 全局js -->
+<script src="/js/jquery.min.js?v=2.1.4" th:src="@{/js/jquery.min.js?v=2.1.4}"></script>
+<script src="/js/bootstrap.min.js?v=3.3.6" th:src="@{/js/bootstrap.min.js?v=3.3.6}"></script>
+
+<!-- 自定义js -->
+<script src="/js/content.js?v=1.0.0" th:src="@{/js/content.js?v=1.0.0}"></script>
+
+<!-- jQuery Validation plugin javascript-->
+<script src="/js/ajax-util.js"></script>
+<script src="/js/plugins/validate/jquery.validate.min.js"
+        th:src="@{/js/plugins/validate/jquery.validate.min.js}"></script>
+<script src="/js/plugins/validate/messages_zh.min.js" th:src="@{/js/plugins/validate/messages_zh.min.js}"></script>
+<script src="/js/plugins/layer/layer.min.js" th:src="@{/js/plugins/layer/layer.min.js}"></script>
+
+<script type="text/javascript">
+    parent.location.href = '/index?sysFlag=1';
+</script>
+</body>
+</html>