whycxzp
2022-03-07 453bb7a946a35af96efddb334f6eef0a1b4a0757
src/main/java/com/whyc/Application.java
@@ -31,20 +31,6 @@
        SpringApplication.run(Application.class,args);
        ApplicationContext applicationContext = SpringUtil.getApplicationContext();
        PasswordResetService service = (PasswordResetService) applicationContext.getBean("passwordResetService");
        //密码格式预读及手动确认
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入用做校验的用户名:");
        String name = sc.nextLine();
        Response response = service.preCheck(name);
        System.out.println("当前密码模式为:"+response.getMsg()+",密码为"+response.getData());
        System.out.println("核查正确请输入y,不正确请输入n");
        String flag = sc.nextLine();
        if(!flag.toUpperCase().equals("Y")){
            System.out.println("密码解析失败,终止程序");
            System.exit(1);
        }
        //进行密码修改
        service.passwordReset();
        //密码格式重置
        service.passwordReset();