Last active
June 17, 2020 21:07
-
-
Save luissilvazup/e8223118d9a0dad5d4295bd3a89bae72 to your computer and use it in GitHub Desktop.
SRP Solution Part 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class S_SingleResponsabilitySolution { | |
private static class ConnectionDAO { | |
private Properties connectionProps; | |
private Connection conn; | |
private static final String URL = "jdbc:mysql://localhost:3306/employee?useSSL=false"; | |
private ConnectionDAO(String username, String password) { | |
connectionProps = new Properties(); | |
connectionProps.put("user", username); | |
connectionProps.put("password", password); | |
} | |
private Connection createConnection() { | |
//Cria conexão com o banco | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment