src/main/java/com/springboot/api/util/CommonUtils.java
/**
	   * Method to auto-generate password
	   * @return String 
	   */
Method to auto-generate password
@return String
Method to auto - generate password @return String
public static String generatePassword() {  
		 final String ALLOWED_PASSWORD_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!$%*";  
	      SecureRandom randomNo = new SecureRandom();  
	      StringBuffer result = new StringBuffer();  
	      for( int i=0; i<8; i++ ){  
	          result.append( ALLOWED_PASSWORD_CHARS.charAt(randomNo.nextInt( ALLOWED_PASSWORD_CHARS.length() ) ) );  
	      }  
	      return result.toString();  
	}
public static String generatePassword ( ) { final String ALLOWED_PASSWORD_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!$%*" ; SecureRandom randomNo = new SecureRandom ( ) ; StringBuffer result = new StringBuffer ( ) ; for ( int i = 0 ; i < 8 ; i ++ ) { result . append ( ALLOWED_PASSWORD_CHARS . charAt ( randomNo . nextInt ( ALLOWED_PASSWORD_CHARS . length ( ) ) ) ) ; } return result . toString ( ) ; }
Method to auto-generate password
 @return String
Method to auto - generate password @return String