jar
jinlin
2025-03-04 23f02e6b45dd7cf0ab2e7827144913ca59575ea4
src/main/java/com/example/client/Login.java
@@ -47,6 +47,7 @@
        String password = "admin";
        String site = "";
        String teamGroup = "";
        String team = "";
        String path = Login.class.getClassLoader().getResource("config.properties").getPath();
        InputStream inStream = null;
@@ -70,9 +71,10 @@
            password = properties.get("password").toString();
            site = properties.get("site").toString();
            teamGroup = properties.get("teamGroup").toString();
            team = properties.get("team").toString();
        } catch (IOException e) {
            e.printStackTrace();
        }finally {
        } finally {
            if (reader != null) {
                try {
                    reader.close();
@@ -136,6 +138,7 @@
        String finalSite = site;
        String finalTeamGroup = teamGroup;
        String finalTeam = team;
        loginButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
@@ -144,7 +147,7 @@
                String str = String.valueOf(password); //将char数组转化为string类型
                user = userService.login(name,str);
                user = userService.login(name, str);
                exist = user.getExist();
@@ -165,7 +168,6 @@
                        }
                        properties.setProperty("userName", name);
                        properties.setProperty("password", str);
                        properties.setProperty("url", "11");
                        properties.store(outputStream, "rxkj");
                        outputStream.close();
                    } catch (FileNotFoundException ex) {
@@ -173,7 +175,7 @@
                    } catch (IOException ep) {
                        ep.printStackTrace();
                    }
                    user.setBoatfleet(finalTeam);
                    CacheUtils.put("user", "user", user);
                    CacheUtils.put("site", "site", finalSite);
                    CacheUtils.put("teamGroup", "teamGroup", finalTeamGroup);