InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("user.properties");   
		   Properties p = new Properties();
		   
		   try {   
		    p.load(inputStream);     
		    String theUserpass=p.getProperty(username);
			   if (theUserpass!=null && theUserpass.equals(password)){
				   return true;
			   }else{
				   return false;
			   }
		   } catch (IOException e1) {   
		    e1.printStackTrace();   
		   }finally{
			   if (inputStream!=null){
				   try {
					inputStream.close();
				} catch (IOException e) {

				}
			   }
		   }

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-15
  • 2022-12-23
猜你喜欢
  • 2022-02-21
  • 2021-11-04
  • 2021-08-22
  • 2021-09-26
相关资源
相似解决方案