DUANY\DuanY 4 anni fa
parent
commit
630351d8b4

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>

+ 41 - 20
.idea/workspace.xml

@@ -1,7 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="ChangeListManager">
-    <list default="true" id="c5a24e7a-e8cf-45f7-8d0b-25810e3d773a" name="默认更改列表" comment="" />
+    <list default="true" id="c5a24e7a-e8cf-45f7-8d0b-25810e3d773a" name="默认更改列表" comment="">
+      <change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/sso-login/target/classes/com/sso/login/controller/LoginController.class" beforeDir="false" afterPath="$PROJECT_DIR$/sso-login/target/classes/com/sso/login/controller/LoginController.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/sso-main/src/main/java/com/sso/main/controller/ViewController.java" beforeDir="false" afterPath="$PROJECT_DIR$/sso-main/src/main/java/com/sso/main/controller/ViewController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/sso-main/target/classes/com/sso/main/controller/ViewController.class" beforeDir="false" afterPath="$PROJECT_DIR$/sso-main/target/classes/com/sso/main/controller/ViewController.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/sso-main/target/classes/templates/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/sso-main/target/classes/templates/index.html" afterDir="false" />
+    </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
     <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@@ -15,6 +22,9 @@
       </list>
     </option>
   </component>
+  <component name="Git.Settings">
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
+  </component>
   <component name="ProjectId" id="1lzQTfAXKnwTcVbccaZ8sG4KP4p" />
   <component name="ProjectViewState">
     <option name="hideEmptyMiddlePackages" value="true" />
@@ -28,6 +38,7 @@
     <property name="RequestMappingsPanelWidth0" value="75" />
     <property name="RequestMappingsPanelWidth1" value="75" />
     <property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
+    <property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
     <property name="WebServerToolWindowFactoryState" value="false" />
     <property name="aspect.path.notification.shown" value="true" />
     <property name="jdk.selected.JAVA_MODULE" value="1.8" />
@@ -106,9 +117,9 @@
     </list>
     <recent_temporary>
       <list>
-        <item itemvalue="Spring Boot.VipApp" />
         <item itemvalue="Spring Boot.MainApp" />
         <item itemvalue="Spring Boot.LoginApp" />
+        <item itemvalue="Spring Boot.VipApp" />
       </list>
     </recent_temporary>
   </component>
@@ -124,6 +135,8 @@
       <updated>1608597448224</updated>
       <workItem from="1608597450909" duration="10657000" />
       <workItem from="1608614660628" duration="4822000" />
+      <workItem from="1608631578360" duration="4551000" />
+      <workItem from="1608684196974" duration="240000" />
     </task>
     <servers />
   </component>
@@ -155,45 +168,53 @@
       <screen x="0" y="0" width="1920" height="1050" />
     </state>
     <state x="1154" y="286" key="FileChooserDialogImpl/0.0.1920.1050@0.0.1920.1050" timestamp="1608599626317" />
-    <state width="1877" height="282" key="GridCell.Tab.0.bottom" timestamp="1608619487493">
+    <state width="1877" height="282" key="GridCell.Tab.0.bottom" timestamp="1608639417874">
       <screen x="0" y="0" width="1920" height="1050" />
     </state>
-    <state width="1877" height="282" key="GridCell.Tab.0.bottom/0.0.1920.1050@0.0.1920.1050" timestamp="1608619487493" />
-    <state width="1877" height="282" key="GridCell.Tab.0.center" timestamp="1608619487493">
+    <state width="1877" height="282" key="GridCell.Tab.0.bottom/0.0.1920.1050@0.0.1920.1050" timestamp="1608639417874" />
+    <state width="1877" height="282" key="GridCell.Tab.0.center" timestamp="1608639417874">
       <screen x="0" y="0" width="1920" height="1050" />
     </state>
-    <state width="1877" height="282" key="GridCell.Tab.0.center/0.0.1920.1050@0.0.1920.1050" timestamp="1608619487493" />
-    <state width="1877" height="282" key="GridCell.Tab.0.left" timestamp="1608619487493">
+    <state width="1877" height="282" key="GridCell.Tab.0.center/0.0.1920.1050@0.0.1920.1050" timestamp="1608639417874" />
+    <state width="1877" height="282" key="GridCell.Tab.0.left" timestamp="1608639417874">
       <screen x="0" y="0" width="1920" height="1050" />
     </state>
-    <state width="1877" height="282" key="GridCell.Tab.0.left/0.0.1920.1050@0.0.1920.1050" timestamp="1608619487493" />
-    <state width="1877" height="282" key="GridCell.Tab.0.right" timestamp="1608619487493">
+    <state width="1877" height="282" key="GridCell.Tab.0.left/0.0.1920.1050@0.0.1920.1050" timestamp="1608639417874" />
+    <state width="1877" height="282" key="GridCell.Tab.0.right" timestamp="1608639417874">
       <screen x="0" y="0" width="1920" height="1050" />
     </state>
-    <state width="1877" height="282" key="GridCell.Tab.0.right/0.0.1920.1050@0.0.1920.1050" timestamp="1608619487493" />
-    <state width="1877" height="282" key="GridCell.Tab.1.bottom" timestamp="1608619487493">
+    <state width="1877" height="282" key="GridCell.Tab.0.right/0.0.1920.1050@0.0.1920.1050" timestamp="1608639417874" />
+    <state width="1877" height="282" key="GridCell.Tab.1.bottom" timestamp="1608639417874">
       <screen x="0" y="0" width="1920" height="1050" />
     </state>
-    <state width="1877" height="282" key="GridCell.Tab.1.bottom/0.0.1920.1050@0.0.1920.1050" timestamp="1608619487493" />
-    <state width="1877" height="282" key="GridCell.Tab.1.center" timestamp="1608619487493">
+    <state width="1877" height="282" key="GridCell.Tab.1.bottom/0.0.1920.1050@0.0.1920.1050" timestamp="1608639417874" />
+    <state width="1877" height="282" key="GridCell.Tab.1.center" timestamp="1608639417874">
       <screen x="0" y="0" width="1920" height="1050" />
     </state>
-    <state width="1877" height="282" key="GridCell.Tab.1.center/0.0.1920.1050@0.0.1920.1050" timestamp="1608619487493" />
-    <state width="1877" height="282" key="GridCell.Tab.1.left" timestamp="1608619487493">
+    <state width="1877" height="282" key="GridCell.Tab.1.center/0.0.1920.1050@0.0.1920.1050" timestamp="1608639417874" />
+    <state width="1877" height="282" key="GridCell.Tab.1.left" timestamp="1608639417874">
       <screen x="0" y="0" width="1920" height="1050" />
     </state>
-    <state width="1877" height="282" key="GridCell.Tab.1.left/0.0.1920.1050@0.0.1920.1050" timestamp="1608619487493" />
-    <state width="1877" height="282" key="GridCell.Tab.1.right" timestamp="1608619487493">
+    <state width="1877" height="282" key="GridCell.Tab.1.left/0.0.1920.1050@0.0.1920.1050" timestamp="1608639417874" />
+    <state width="1877" height="282" key="GridCell.Tab.1.right" timestamp="1608639417874">
       <screen x="0" y="0" width="1920" height="1050" />
     </state>
-    <state width="1877" height="282" key="GridCell.Tab.1.right/0.0.1920.1050@0.0.1920.1050" timestamp="1608619487493" />
+    <state width="1877" height="282" key="GridCell.Tab.1.right/0.0.1920.1050@0.0.1920.1050" timestamp="1608639417874" />
     <state x="880" y="103" key="SettingsEditor" timestamp="1608599446226">
       <screen x="0" y="0" width="1920" height="1050" />
     </state>
     <state x="880" y="103" key="SettingsEditor/0.0.1920.1050@0.0.1920.1050" timestamp="1608599446226" />
-    <state x="669" y="305" key="new project wizard" timestamp="1608597551310">
+    <state x="552" y="260" key="Vcs.Push.Dialog.v2" timestamp="1608684413460">
+      <screen x="0" y="0" width="1920" height="1050" />
+    </state>
+    <state x="552" y="260" key="Vcs.Push.Dialog.v2/0.0.1920.1050@0.0.1920.1050" timestamp="1608684413460" />
+    <state x="634" y="326" key="git4idea.merge.GitPullDialog" timestamp="1608684216939">
+      <screen x="0" y="0" width="1920" height="1050" />
+    </state>
+    <state x="634" y="326" key="git4idea.merge.GitPullDialog/0.0.1920.1050@0.0.1920.1050" timestamp="1608684216939" />
+    <state x="325" y="204" key="new project wizard" timestamp="1608684342660">
       <screen x="0" y="0" width="1920" height="1050" />
     </state>
-    <state x="669" y="305" key="new project wizard/0.0.1920.1050@0.0.1920.1050" timestamp="1608597551310" />
+    <state x="325" y="204" key="new project wizard/0.0.1920.1050@0.0.1920.1050" timestamp="1608684342660" />
   </component>
 </project>

BIN
sso-login/target/classes/com/sso/login/controller/LoginController.class


+ 4 - 0
sso-main/src/main/java/com/sso/main/controller/ViewController.java

@@ -8,6 +8,7 @@ import org.springframework.web.client.RestTemplate;
 import org.thymeleaf.util.StringUtils;
 
 import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
 import java.util.Map;
 
@@ -29,11 +30,14 @@ public class ViewController {
             String token=cookie.getValue();
             if(!StringUtils.isEmpty(token)){
                 Map result = restTemplate.getForObject(LOGIN_INFO_ADDRESS + token, Map.class);
+                System.out.println(token);
                 //保存用户
                 session.setAttribute("loginUser",result);
             }
         }
         return "index";
     }
+
+
 }
 

BIN
sso-main/target/classes/com/sso/main/controller/ViewController.class


+ 1 - 0
sso-main/target/classes/templates/index.html

@@ -8,6 +8,7 @@
     <h1>这是主页</h1>
     <span>
         <a th:if="${session.loginUser==null}" href="http://login.codeshop.com/view/login?target=http://www.codeshop.com/view/main">登录</a>
+        <a th:unless="${session.loginUser==null}" href="http://www.codeshop.com/view/remove">退出</a>
     </span>
 
 <p th:unless="${session.loginUser==null}">